I doubt we could slip this into D7 at this point so I'm marking it for D8. For multi-insert queries, it would be quite useful to know how many records they currently have queued up. The natural way to do that is to simply have InsertQuery implement the Countable interface, and return the number of records it has queued to insert.

Easy patch. Too bad we have to wait for D8, but at least it will give us something to look forward to. :-)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

EvanDonovan’s picture

@Crell: Still planning to write a patch for this?

Crell’s picture

I'd still like to see it happen. You are welcome and encouraged to beat me to it. :-)

Crell’s picture

Version: 8.0.x-dev » 8.1.x-dev
Issue summary: View changes
amateescu’s picture

FileSize
1.26 KB

Too bad this issue was forgotten :)

Crell’s picture

Why not put the method in the trait now?

amateescu’s picture

FileSize
1.36 KB
1.36 KB

Because of limited brain space at midnight :/

Crell’s picture

Status: Active » Reviewed & tested by the community

Setting to RTBC but leaving at 8.1. Like a boss, er, something...

The last submitted patch, 4: 664722.patch, failed testing.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 6: 664722-6.patch, failed testing.

amateescu’s picture

Assigned: Crell » Unassigned
Status: Needs work » Reviewed & tested by the community
FileSize
1.36 KB

Rerolled and back to RTBC, per the boss in #7 :D

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 10: 664722-10.patch, failed testing.

amateescu’s picture

Status: Needs work » Reviewed & tested by the community

That was a random testbot failure.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.0-beta1 was released on March 2, 2016, which means new developments and disruptive changes should now be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

catch’s picture

Version: 8.2.x-dev » 8.1.x-dev
Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

Could still go into 8.1.x, but to do that could use test coverage.

amateescu’s picture

Status: Needs work » Needs review
Issue tags: -Needs tests
FileSize
3.65 KB
2.29 KB

Sure thing :)

Crell’s picture

Status: Needs review » Reviewed & tested by the community

That's probably more than we need, but gets the job done.

catch’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs reroll

Needs a re-roll... test has moved.

amateescu’s picture

Status: Needs work » Reviewed & tested by the community
Issue tags: -Needs reroll
FileSize
3.67 KB

Rerolled.

  • catch committed 26b14bc on 8.2.x
    Issue #664722 by amateescu: Make insert queries Countable
    
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.2.x and cherry-picked to 8.1.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.