Static
clearClears all entities from the table.
The type of the entity.
Static
countGet the number of entities in the table.
The type of the entity.
The number of entities in the table.
Static
findStatic
findTakes a option value of SELECT and/or WHERE. Retrieves in the SELECT format if given and all if not. Finds the first instance that matches WHERE
The type of the entity.
An single BaseEntity type containing the first instance of the WHERE claus
This must be called from a class that extends BaseEntity
,
has one primary attribute, and the class has an Entity
decorator. The mysql
database must also be initialized using the hook useInitDataSource
. There must be a where value
given and it must be the condiiton you want to select one
Static
getGet a list of all database column names.
The type of the entity.
A list of column data.
Static
queryExecutes a query.
It automatically replaces $table
with the entity’s table name.
The type of the entity.
An the result of the query the same way as the expo-sqlite database does see
https://docs.expo.dev/versions/latest/sdk/sqlite/.
If, after reading the documentation, you are still unsure what kind of object will be
returned, don't worry, that is normal. Their documentation is terrible.
Each Column where isList: true
will be returned as a json string, convert
it from a json to a list (ex. Array
Static
queryExecutes a query that returns a list of objects of the type this
is called with.
It automatically replaces $table
with the entity’s table name.
The type of the entity.
An array of entities resulting from the query.
Core class for all db entities. Db entities must extend this class.