Coder Social home page Coder Social logo

Comments (1)

LexLythius avatar LexLythius commented on June 24, 2024

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:

  1. Abstract DB class has to know in advance of adapter implementations.
  2. 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.
  3. 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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.