Comments (6)
@rjrodger see here for the tests https://github.com/rjrodger/seneca-store-test/blob/master/store-test.js#L457
from seneca-store-test.
no - this is not correct - is not allowed directly :)
a string in this position is always an opaque id
however, we can support { $native:"SELECT..." } as the query parameter - I think this is a valid use case, as it supports generating entity objects from a native query
note that this feature now applies to all stores, but is OPTIONAL - so we now introduce the idea of optional store features....
frameworks are fun
from seneca-store-test.
I'm afraid opaque id feature is not mentioned anywhere, I'll add tests for that.
I'll convert the the sql tests to use the native$ option. This will break backward compatibility on some of the stores.
About being optional to some of the stores, seneca-store-test is already constructed in way that makes easy to import and run only relevant tests (e.g.: basics, but not native sql)
from seneca-store-test.
@rjrodger I was wondering, is the "opaque id" supposed to work with the list$ command too?
from seneca-store-test.
@rjrodger Additional question: how is { native$: ... } supposed to work?
from seneca-store-test.
list$ should be able to take an array of ids as the query... so a degenerate case is a single id - so yes, opaque ids work for list$ too
{ native$:"SELECT * FROM foo" } should execute the query, and then construct -/-/foo entities using the result set.
from seneca-store-test.
Related Issues (20)
- Add functionality to retrieve elements count HOT 2
- Functionality for matching strings by portion of a string (db agnostic pattern matching mechanizm)?
- add fields$ test
- The definition function for the plugin mongo-store has failed: Cannot read property 'init' of undefined HOT 2
- verify store always returns data from store when saving
- verify merge$ works
- Test the db API/module is working HOT 1
- Automatically generate a test db when running tests
- Convert use of Assert to lab
- Make CI pull various store plugins and run tests against them
- Remove fetchProp HOT 2
- improve test coverage to 80%+
- add github actions build HOT 3
- upsert happy path test HOT 4
- Reorganize test cases and names for easier eye-balling of cases HOT 3
- npm run reset fails
- github actions build is failing
- condense upsert tests into larger blocks of tests
- Fix a mysterious bug HOT 2
- remove chai
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 seneca-store-test.