Git Product home page Git Product logo

Comments (8)

noha avatar noha commented on May 26, 2024

When using a block in a query it constructs a MongoQuery which is supposed to be the value of the block. true is not a mongo query. But using #selectAll would do the kob ;)

from voyage.

zecke avatar zecke commented on May 26, 2024

True. If I know there is only one I can do (selectAll: Class) first but somehow this still feels wasteful (fetch all results and throw away the rest). I wouldn't want to add such code. :)

from voyage.

noha avatar noha commented on May 26, 2024

If there is more than one the specification of "true" does not make much sense either ;) If you insist doing that you can use: selectOne: [ :query | query where: 'true' ]. I cannot think of another possibility yet. But again you get a MongoQuery object that helps making queries easier. It is one of this basic implementation showing how cool it could be but the are that kind of limited you have to use the dictionary approach pretty soon

from voyage.

noha avatar noha commented on May 26, 2024

Is there still things to discus/change?

from voyage.

zecke avatar zecke commented on May 26, 2024

Well, the question is if Mongo/NoSQL/Memory should have the same protocol (and similar behavior) or not. I used to substitute VOMongoRepository for VOMemoryRepository in my unit tests but I know I can create facades for that too.

from voyage.

noha avatar noha commented on May 26, 2024

The protocol question is two-fold. There is a superclass called VORepository. The protocol of VORepository must be implemented in the specific subclasses and it needs to behave the same. Otherwise you cannot swap out one implementation and swap in another one because you would need to adjust business logic. But the specific subclasses have additional protocols to configure and use specific behaviour of the database. The biggest task we need to solve is how you can have a generic way of setting things that trigger the right behaviour in the specific implementation. This way we can have a generic object serializer and ways to make it behave more efficient on a specific database

from voyage.

noha avatar noha commented on May 26, 2024

But I have a look into it if either of the implementations need to change

from voyage.

noha avatar noha commented on May 26, 2024

It seems this is a misunderstanding. Using blocks in queries does not mean that it should support all smalltalk expressions. It is rather that the restricted set of database operations can look like smalltalk

from voyage.

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.