This patch update modules/block/* as DBTNG syntax.

I have no idea about the revamp for db_rewrite_sql(), so left a comment message for that as:

// @todo: Revamp with DBTNG syntax.

Comments

Status: Needs review » Needs work

The last submitted patch failed testing.

hswong3i’s picture

Status: Needs work » Needs review
StatusFileSize
new14.19 KB

Reroll based on CVS HEAD.

Status: Needs review » Needs work

The last submitted patch failed testing.

hswong3i’s picture

Status: Needs work » Needs review
StatusFileSize
new14.21 KB

Reroll based on CVS HEAD.

Status: Needs review » Needs work

The last submitted patch failed testing.

dropcube’s picture

Status: Needs work » Postponed

I think is better to concentrate efforts first in #257032: Split block $ops into separate functions

Crell’s picture

Title: [DBTNG] revamp modules/block/* with DBTNG syntax » DBTNG: Block module
Status: Postponed » Active
Issue tags: +DBTNG Conversion

Reactiviating.

zoo33’s picture

Wow. Duplicated efforts:

#302263: Rework block.module for the new data api

@hswong3i: If you want to compare notes or work together on this somehow, let me know. Both our patches need to be re-rolled.

But maybe dropcube is right about #257032: Split block $ops into separate functions

Crell’s picture

Assigned: hswong3i » Unassigned
berdir’s picture

Status: Active » Needs review
StatusFileSize
new19.31 KB

Ok, another patch, also converted the dynamic queries and added a tag to the block loading query.

dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD. Thanks!

chx’s picture

Why are we having explicit int casts for default values? They were not needed before. That's curious.

Crell’s picture

FALSE and NULL no longer auto-fold to int 1, so that has to be done explicitly. I do not want to do that automatically because of the performance hit.

chx’s picture

But why in #default_value and not in the save routines...? And, in general, if we are using d_w_r which retrieves the schema anyways, then we could autocast there.

berdir’s picture

StatusFileSize
new1.08 KB

Not sure, the first one is obviously needed, but I can't find a reason for these, manual testing and the block tests work, let's ask the test bot...

berdir’s picture

Status: Fixed » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

berdir’s picture

StatusFileSize
new1.63 KB

Ok, so that obviously doesn't work, not sure why my local tests did work though. Another try which converts the value only before saving...

berdir’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new2.22 KB

This time for real, tests pass locally...

catch’s picture

Status: Needs review » Needs work

There should be a space between the (int) and the $var.

berdir’s picture

Status: Needs work » Needs review
StatusFileSize
new2.22 KB

Re-roll with casting coding style fixed.

catch’s picture

Status: Needs review » Reviewed & tested by the community

Looks good.

dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)
Issue tags: -DBTNG Conversion

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