-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Db traits #1097
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
these parts can be reused in other ActiveRecord implementations
... for different dbms
Can't we just reuse the PHP constants I tried to do it with namespaced constants that are accessable like |
|
defining constant in a trait is not possible btw. |
|
Moved to beta milestone. I'm still not quite sure about this... |
|
Further Todo:
|
Updated AR classes with the latest changes from master to go on with separation of AR query classes in traits. Conflicts: framework/yii/db/ActiveQuery.php framework/yii/db/ActiveRecord.php framework/yii/db/ActiveRelation.php
|
This is the current structure of db classes now: The PHPdoc got duplicated now as it is once in the interface and once in the trait. need to clean that up later (best when we have api doc generator to see where |
this allows us to implement other activerecord implementations based on NoSQL dbms
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...implemented by active query classes?
|
What about ActiveRecord? Is it possible to extract an interface and/or a trait? |
As I said in discussion yesterday I'd like to do that later when I implemented redis and elasticsearch to see what is the common part. |
strict sql dbms like postgres would fail otherwise
|
Should be all fine now except the |
|
Everything looks good to me. Thanks for the great work! |
|
How about rename |
|
Actually, perhaps we should put all these interfaces and traits under |
|
I initially thought about having the db independend ActiveRecord classes in |
|
Yes, let's put these interfaces and traits under For elasticsearch and other DB solutions, I think we should put them directly under |
|
FYI, I have moved the traits/interfaces back to yii/db. |
|
I have some concerns:
|

I created a BaseQuery in
yii\dbthat supportswhere,limit,offset,orderByandindexBy. These are imo the basic operations that have to be implemented by a dbms. This is also everything that is needed by dataprovider and gridview.