Comments (3)
Good question! I think that's absolutely possible. Actually if you've used Django, you'll see Django provides a uniform interface with different databases. That's also what I have in mind when I first start to implement this module, but at that time I figured it's probably better to make the module function properly on one database, then extend to some other databases.
If you're interested in implementing it, that would be great, since this module seems to work quite well in MySQL now and I'm been using it all the time. I would say extract the common part between different wrappers to form an abstract super class, then extend this super class to implement different sub-classes for different types of database. It would probably be more complicated than what I said, because the driver for MySQL and SQLite may not have the same interface, but I figure that would be one possible way to go.
Finally I do have some suggestions here if you're going to implement this part (you're probably a more experienced developer than I am and you're already well aware of them, but still I should say it)
- Keep the interface unchanged as much as possible
- Write unit tests
from monsql.
Sorry, that's me. I have different github accounts...
from monsql.
I agree. I was thinking of implementing an abstract class that the different SQL versions may then
subclass it... Just like you said. If a SQL database requires specific features then it remains its responsibility to ensure it works as expected.
The interface should remain the same thus no or minimal interface change. I will discuss with you on any interface change proposals.
I hope to get time to work on this feature.
from monsql.
Related Issues (11)
- Add filter parameter to Table.count
- Add using parameter to Table.remove
- Add test case for query set filter and limit
- Add distinct to find and find_one
- Specify MySQL Database Driver HOT 4
- Improved Testing HOT 4
- Request for Code Commenting and Elaboration HOT 6
- Add support for complex operator: $startswith, $endswith
- Support MapReduce
- Add support for PostgreSQL
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monsql.