Comments (8)
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.
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.
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.
Is there still things to discus/change?
from voyage.
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.
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.
But I have a look into it if either of the implementations need to change
from voyage.
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)
- Fix FFI and reactivate unqlite build HOT 2
- Review error scenario of full network outage (no replica can be reached) HOT 2
- Method #remove fails to remove object from MongoDB HOT 1
- Rewrite install script for travis HOT 1
- Refactor VOCollector
- Make save selectors with options available in object
- Unify querying interface
- P8 Win64: Voyage not installing HOT 1
- Arango: 2 tests with DNU HOT 5
- mongo: slaveOk flag should be subject to the readPreference handling HOT 2
- in VOSeedVersionGenerator >> #newVersion method throws DNU HOT 4
- VOMongoJSONSerializer have no references maybe we should remove it
- VOMongoRepository InstanceVariable host & port are unuse HOT 3
- [Voyage-mongo-tests] VOMongoTest class >> #isAbstract strange implementation HOT 2
- typo conflict on VOReadOperation & VOExternalRepository >> #synchronize: HOT 1
- why using UUID instead of VOSeedVersionGenerator HOT 2
- Mongo connections not being returned to pool HOT 1
- Links in Others are 404
- Select many with sort block fails HOT 1
- Remove ConfigurationOf* HOT 1
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 voyage.