0

I am using ObjectBox for the flutter project. I want to get the pragma table info for the my Product Entity. Anyone know how to get the pragma for particular Entity?

Like in sqlite pragma table_info('albums');

cid  name      type           notnull  dflt_value  pk
---  --------  -------------  -------  ----------  --
0    AlbumId   INTEGER        1                    1
1    Title     NVARCHAR(160)  1                    0
2    ArtistId  INTEGER        1                    0

we can get the table details. I want same in ObjectBox.

Harin Kaklotar
  • 305
  • 7
  • 22
  • Can you elaborate what you mean by pragma? Note that ObjectBox is not a traditional SQL database, but a key value store. Also the model is defined by annotating classes and operations are exposed by an API, not a query language. https://docs.objectbox.io/getting-started – Uwe - ObjectBox May 23 '22 at 05:43
  • Like in sql we get table's column name using this query "pragma table_info('Product');", I want same in objectbox. – Harin Kaklotar May 23 '22 at 05:53
  • Such an API doesn't exist, as said ObjectBox is not a traditional relational database. However, the [model JSON file](https://docs.objectbox.io/advanced/meta-model-ids-and-uids#json-for-consistent-ids) (`lib/objectbox-model.json`) contains some of the information you want. What do you want to do with this info? – Uwe - ObjectBox May 23 '22 at 13:36

0 Answers0