Documentation
¶
Index ¶
- func CreateSchema(ctx context.Context, schema *pkg.Schema, db *sqlx.DB) error
- func GenerateSQLiteCreateTable(schema *pkg.Schema) (map[string][]string, error)
- func GenerateSQLiteDeleteObject(schema *pkg.Schema) (map[string]string, error)
- func GenerateSQLiteGetObjectMainTable(schema *pkg.Schema) (string, error)
- func GenerateSQLiteGetObjectSecondaryTable(schema *pkg.Schema, name string) (string, error)
- func GenerateSQLiteListObjectsMainTable(schema *pkg.Schema, limit, offset int) (string, error)
- func GenerateSQLiteListObjectsSecondaryTable(schema *pkg.Schema, name string, ids []int64) (string, error)
- func GenerateSQLiteUpdateObject(schema *pkg.Schema) (map[string]string, error)
- func GetObject(ctx context.Context, db *sqlx.DB, schema *pkg.Schema, id int64) (map[string]interface{}, error)
- func InsertData(ctx context.Context, db *sqlx.DB, schema *pkg.Schema, ...) (int64, error)
- type PaginationRequest
- type PaginationResponse
- type QueryData
- type TableData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateSchema ¶
CreateSchema creates the schema in the database. It generates all the SQL queries to CREATE the tables and indexes and runs it inside a transaction.
func GenerateSQLiteGetObjectMainTable ¶
GenerateSQLiteGetObjectMainTable generates SQLite query for getting the object with id from table.
Types ¶
type PaginationRequest ¶
type PaginationResponse ¶
func ListObjects ¶
func ListObjects( ctx context.Context, db *sqlx.DB, schema *pkg.Schema, paginationRequest *PaginationRequest, ) (*PaginationResponse, error)
Click to show internal directories.
Click to hide internal directories.