sdboyer started a branch about using d7 database layer with the backport module dbtng. I rebase it on top of my oop branch.

It looks interesting.. so, what do you think about this integration?

Comments

marvil07’s picture

Status: Needs review » Active

jpetso is ok with this integration too like we chat some minutes ago, but after dww comments I would prefer to maintain those mentioned branches some more time

sdboyer’s picture

We should be 100% on wanting to do this. It will vastly simplify the internals of the code, and allow the focus to come off the API as basically a querybuilder. (really, that's most of what it is right now).

marvil07’s picture

Version: 6.x-1.0-rc2 » 6.x-2.x-dev
Status: Active » Needs work
marvil07’s picture

forgot the patch started by sdboyer, let's keep this in the queue until a more intrusive patch :-p

sdboyer’s picture

Issue tags: +git phase 2

this is really a necessary part of making the code maintainable for d.o. and besides, we might as well strike while the iron's hot...

mikey_p’s picture

If this is intended for drupal.org we need to get approval from the powers that be for dbtng module soon, it has some major drawbacks in certain areas, namely that it opens a second DB connections since the PDO driver can't reuse the mysqli connection.

sdboyer’s picture

I got approval (in concept, at least) for this years ago from killes, though now that we're actually doing it, it probably needs revisiting.

marvil07’s picture

I'm making a big patch of the sdboyer work at github. Let's end up this work here so we can discuss about the changes before committing.

Pasting commit descriptions:

dbtng integration and entities conversion

- Entities-based approach.
- Initial refactor of the VersioncontrolRepository class to make it properly receive data loaded by the entity controllers via the backend.
- Note about class listings for factory behavior of VersioncontrolBackend
- Update the backends to allow them to alter queries as they are being built by the entity controller.
- Add an optional callback for direct query modification. Note that this potentially screws with caching, so we may not want to retain this approach.
- Initial pseudocode for a VersioncontrolRepository::getLabels() method that utilizes an entity controller stored on the Repository object itself.

I'll be commenting on this patch in the next days.

marvil07’s picture

I think we should either mark this or #831896: Refactor VC API to use DBTNG & an Entities-like system as duplicates, or we should split the patch in two.

sdboyer’s picture

Status: Needs work » Closed (duplicate)

Let's actually mark this one the duplicate (sorry, given that you just posted that patch here), as that other issue has more information about the approach I'm taking over on github.