Comments (4)
fwiw so far
var makeQuery = function(queryHash) {
var keys = Object.getOwnPropertyNames(queryHash);
if (Object.getOwnPropertySymbols) {
keys = keys.concat(Object.getOwnPropertySymbols(queryHash));
}
var out = "";
for (var i=0; i<keys.length; i++) {
var key = keys[i];
if (i > 0) out += " AND ";
out += key + " = ";
if ((typeof queryHash[key]) === 'number') {
out += queryHash[key];
}
else {
// TODO: how to escape? so far only ascii ids, so it's ok
out += "'" + queryHash[key] + "'";
}
}
if (out.length === 0) return null;
return out;
};
from realm-js.
what does a null query like realm.object('TodoItem', null)
do?
from realm-js.
realm.objects('TodoItem')
gets all TodoItems. If you pass null
for the query we will throw an exception as currently the second argument must be a string. If you want a query that will return all results you can use realm.objects("TodoItem", "truepredicate")
and add build your string up from there.
from realm-js.
ok, i'll return "truepredicate" instead of null
from realm-js.
Related Issues (20)
- [Fatal Error] realm-annotations-processor-10.11.1.pom:2:1: Content is not allowed in prolog HOT 2
- Refactor PR workflow to use a shared "build" and "test" action
- User function arguments is wrapped in an Array
- [@realm/react] Bundle in `lodash.isequal` HOT 2
- Please make compatible to use latest version with old react native versions. HOT 2
- "Realm at path already opened with different sync user" upon reopening with identical configuration HOT 5
- Retrieve data and close realm =>Error: Transaction_ended HOT 3
- Error compiling a project and run JEST test HOT 1
- Migrate our React Native integration test app to RNTA HOT 1
- Corrupt Database on iOS 17 HOT 5
- [`@realm/react`] Export a `createAppContext`
- Publish debug pre-builds for Node.js
- Realm in React Native loses data after long time inactivity and internet disabled HOT 8
- Failed to create the native project - Delete the ios and or android folders... I have none to begin with? HOT 3
- Crash on start: "terminating with uncaught exception of type facebook::jni::JniException: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack trace available" HOT 2
- Devise public API to trigger client reset for a Realm file
- baseUrl Change
- "not authorized to execute command aggregate out" with createCollection HOT 1
- Application couldn't connect into Primary Node in PSA HOT 1
- Realm not working with nextjs App router HOT 5
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 realm-js.