SQL and NoSQL interfaces #886

Closed
cebe opened this Issue Sep 18, 2013 · 2 comments

Comments

Projects
None yet
2 participants
@cebe
Member

cebe commented Sep 18, 2013

This issue is to track what methods all dbms have in common and might go into an interface that could be used by other components such as data providers and widgets.

interface ConnectionInterface
{
    public function open();
    public function close();
    public function getIsActive();
    public function getDriverName();
    // transactions are not supported by all dbms
}

tbc

@ghost ghost assigned cebe Sep 18, 2013

@mcd-php

This comment has been minimized.

Show comment
Hide comment
@mcd-php

mcd-php Sep 20, 2013

Contributor

I strongly support this, had a separate issue creation in today's work plan ;)

Yii2 has great advantage - it dropped JOINs and so can do relations in non-relational and No-SQL storages.

I vote for extraction of database-related classes into separate sub-modules with well-defined "super-interface" (set of interfaces) with all and every method and setting overridable and/or configurable from application config. PDO/MySQL implementation of the super-interface by core team should be just a partial case.

This way, anyone will be able to implement connection to their storage, be it traditional SQL, SQL-like with gotchas via PDO (my case, Apache Cassandra), key-value REST or RPC, remote service as data source with caching, or even mix of all with cross-relations.

For extra points, please see #882, comments for @ef13a11, #885 (offtopic for configuration/instantiation),

Contributor

mcd-php commented Sep 20, 2013

I strongly support this, had a separate issue creation in today's work plan ;)

Yii2 has great advantage - it dropped JOINs and so can do relations in non-relational and No-SQL storages.

I vote for extraction of database-related classes into separate sub-modules with well-defined "super-interface" (set of interfaces) with all and every method and setting overridable and/or configurable from application config. PDO/MySQL implementation of the super-interface by core team should be just a partial case.

This way, anyone will be able to implement connection to their storage, be it traditional SQL, SQL-like with gotchas via PDO (my case, Apache Cassandra), key-value REST or RPC, remote service as data source with caching, or even mix of all with cross-relations.

For extra points, please see #882, comments for @ef13a11, #885 (offtopic for configuration/instantiation),

@cebe

This comment has been minimized.

Show comment
Hide comment
@cebe

cebe Sep 25, 2013

Member

implementation of redis is there #905

Member

cebe commented Sep 25, 2013

implementation of redis is there #905

@cebe cebe referenced this issue Nov 29, 2013

Merged

ActiveRecord Interface and BaseAR #1359

6 of 6 tasks complete

@qiangxue qiangxue closed this in #1359 Nov 30, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment