Comments (5)
In the meantime, I know i can access the database directly via #26 to write my complex queries
#68 (comment) also mentions that we should be able to search via linked objects as well.
Do you have any approaches i should try in the meantime?
from vault.
What sort of ORM model are you using and does it allow table joins?
Vault uses its own implementation on top of SQLite. Link (relationships) resolution is a second step and the current state of the project is that queries do not contain information about linked resources.
Is it possible to query for content using a SQL statement?
You can run queries directly on Vault's db using Vault.getReadableDatabase()
(as you've mentioned), though this will return a normal Cursor
and will not go through the processing pipeline of the library.
This feature is currently not supported. The best thing you could do right now is make queries directly on the db in order to figure out which ids you're after, then use the library on a second query with an IN()
clause providing the desired ids.
Once we figure out a plan for #68 this feature should be supported out-of-the-box and in a type-safe way.
from vault.
Thanks @tomxor I thought that would be the case and best approach.
Thank you.
from vault.
@tomxor just one more question in regards to this issue. I noticed that the database table names look nothing like the content type ids that they are referring to.
Is there a way to identify these tables other than hard coding the table name?
Would it be more useful to the end user if we just used the content type id used in contentful? That way we can make it easier to identify.
from vault.
The table name is an internal string created by the library, it is basically a static prefix combined with a normalized base64 string of the content type id. Right now you can access the generated code directly in order to pull the name of the table:
ModelHelper<Cat> helper = new Cat$$ModelHelper();
helper.getTableName(); // returns a string
I could possibly provide a convenience accessor for this property if that's of interest for anyone.
from vault.
Related Issues (20)
- Vault fails to sync in preview mode if there is an empty CDAAsset HOT 5
- Kotin data class support HOT 1
- Vault without fallback language HOT 1
- How can I get Location fields with Vault? HOT 3
- Environments HOT 2
- Fetching entry without subentries HOT 1
- Use @Nullable annotation when possible HOT 2
- @Field Map in Kotlin gives unsupported type error HOT 3
- Rich text fields HOT 2
- VaultDatabaseExporter Broken in 3.2.3 HOT 2
- Android 10 SQLiteDatabaseCorruptException from vault HOT 2
- Proguard issue HOT 8
- Locale FallBack is not Proper HOT 1
- Can the parameters passed to @Space , like the list of content models and list of locale be provided at the run time
- Not getting updated data with delta sync when we republish a content model which is having relation with another content model
- There is no way to get SynchronisedSpace and see deleted assets/entries during the Vault synchronization process.
- Annotation processor is not incremental
- CDARichDocument Unsupported Type for Vault HOT 1
- Download locale specific data?
- Vault library is breaking after migrating to AGP 8.0.0 with R8 in fullmode
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 vault.