Skip to content
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

send all database queries through a single class #23

Open
kaeverens opened this issue Oct 16, 2013 · 1 comment
Open

send all database queries through a single class #23

kaeverens opened this issue Oct 16, 2013 · 1 comment

Comments

@kaeverens
Copy link
Owner

the class should be abstract enough that it can eventually be pointed at any database at all, or a NoSQL solution.

I'm particularly interested in this because I find I'm doing a lot of database caching these days to try speed things up, and those caches take the form of JSON files. if we were using a NoSQL solution, they would already be in that form.

also, NoSQL solutions don't have schemas, so we can update schemas as we need them.

@kaeverens
Copy link
Owner Author

started work on this.

I'm currently finding all cases where a database query is run to find information based on an ID, and replacing those queries with calls to initialise objects of that type instead. for example, instead of requesting the "name" value of a "products" table row of instance $id, I get Product::getInstance($id) and get name from that.

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

No branches or pull requests

1 participant