Comments (1)
As an expedient my pull request #43 fixes the problem (n.b. in a data backwards-incompatible fashion).
However, I see a few problems with this approach:
- Abstract DB class has to know in advance of adapter implementations.
NoSQL
is really a vague umbrella term. The important thing here is whether a given adapter can handle JSON objects on its own or not.- Adapters names are not enforced; however, data massaging logic depends on it.
I figure the best solution would be to have adapters extend from a common prototype having:
a. an "abstract" name
method that by default throws an Exception and should be overriden in derivatives.
b. an implementation-specific method able to massage data fields as necessary prior to insertion, or
c. an implementation-specific method that tells whether the adapter can handle given data type on its own.
Whatever the implementation, the concept is letting the adapters handle data massaging on their own, or at least avoid forcing the higher level classes to know which adapters can handle which data types.
from caminte.
Related Issues (20)
- Mysql adapter models get reset after reconnection
- Json objects returned as strings for "memory" adapter
- support mysql2 driver
- Database Changes
- Database connection error handlers
- Mongoose driver never calls remove callback if no record to delete was found
- sql.js
- I cannot get each column that is specified in mongodb. HOT 1
- two or more database HOT 2
- promise is not return for all/find when asking for all records HOT 2
- MySQL Between Bug
- TypeError [ERR_INVALID_CALLBACK]: Callback must be a function HOT 4
- Electron Integration Example
- Any plan to support GraphQL? HOT 2
- OR clause in where condition not working
- Auxiliary map
- error using caminte -i -a mysql HOT 2
- MYSQL case sensitive comparison
- Domain camintejs.com expired HOT 2
- Composite primary key HOT 3
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 caminte.