tickTackORM

java Library for sqlite databsae (Object Relational Mapping) – begin simple

github Repository

How to use

using maven Maven Central

  ```
  <dependency>
      <groupId>io.github.tabarakmohammed</groupId>
      <artifactId>ticktackorm</artifactId>
      <version>0-1-1-beta</version>
  </dependency>
  ```

First make connection whith database sqlite file :

   IConnection dc = new DatabaseConnection();
   dc.sqliteConnect("jdbc:sqlite:Path To database File");

for creating new tables and columns :

   IConfigurationSchema configurationSchema = new ConfigurationSchema();
   configurationSchema.setupSchema("object model paackge name");

First make Object class

use this @MakeTable annotation to create table then in this class define variables and use @SqliteColumn annotation for create columns

@SqliteColumn has specific parameters for define the attribute or Properties of columns in the table

 NOTNULL,UNIQUE,FOREIGN_KEY,PRIMARY_KEY,PRIMARY_KEY_AUTOINCREMENT.
 
 by example:
 @SqliteColumn(constraint = ConstraintType.NOTNULL)

you can follow this link to see the example of object definition The Example


general usage

create new crud and fetch countiner of specific object : ``` modelObject _modelObject = new modelObject(); FUIDRepositoryInterface _TestRepository_modelObject = new FUIDRepository<>(_modelObject);

long id =1; String sqlCommand = “…”; List<_modelObject> list_modelObject = new ArrayList<>();

_TestRepository_modelObject.insertSingleRow(_modelObject)
_TestRepository_modelObject.insertMultiRow(list_modelObject)
  
list_modelObject = _TestRepository_modelObject.foundAll(id)
list_modelObject = _TestRepository_modelObject.foundAllById(id)
list_modelObject = _TestRepository_modelObject.foundAllBySqlCommandQuery(sqlCommand)
  
_TestRepository_modelObject.deleteById(id)
_TestRepository_modelObject.deleteBySqlCommand(sqlCommand)
_TestRepository_modelObject.updateById(sqlCommand)
_TestRepository_modelObject.updateBySqlCommand(sqlCommand)  ```   ____________________________________________________________________________ ## specific usage

**1. Inserting

**2. Fetching

**3. removing

**4. updating


for creating specific table :

          modelObject _modelObject = new modelObject();
  ICreate<modelObject> _sqliteCreate = new SqliteCreate<>();
  _sqliteCreate.newTable(_modelObject)