Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConditionGroup ¶
type ConditionGroup struct { Key string `json:"key"` Operator string `json:"operator"` Value interface{} `json:"value"` // ConditionGroup is a field that has one of this fields inside itself: [key, operator, value] nor [filterSet, conjunction] FilterSet []ConditionGroup `json:"filterSet"` Conjunction string `json:"conjunction,omitempty" binding:"oneof='and' 'or' ''"` }
type DatabaseStore ¶
type DatabaseStore interface { AddTable(ctx context.Context, db *dbPkg.DB, accountId string, projectName string, tableName string, isPublic, isWritePublic bool) error DeleteTable(ctx context.Context, accountId string, projectName string, tableName string) error IsTablePublic(ctx context.Context, projectTag string, tableName string) (bool, error) IsWriteToTablePublic(ctx context.Context, projectTag string, tableName string) (bool, error) SetTableAccess(ctx context.Context, accountId, projectName, tableName string, isPublic bool) error SetWriteToTableAccess(ctx context.Context, accountId, projectName, tableName string, isWritePublic bool) error AddTableColumn(ctx context.Context, db *dbPkg.DB, accountId string, projectName string, tableName string, columnName string, columnType string) error DeleteTableColumn(ctx context.Context, accountId string, projectName string, tableName string, columnName string) error GetTablesList(ctx context.Context, accountId string, projectName string) ([]string, error) ListTableColumns(ctx context.Context, accountId string, projectName string, tableName string) ([]models.PgColumn, error) RunDatabaseQuery(ctx context.Context, projectTag string, query string) (map[string]interface{}, error) DeleteDatabase(ctx context.Context, accountId string, projectName string) error DeleteDatabaseUser(ctx context.Context, accountId string, projectName string) error GetDatabaseUser(ctx context.Context, accountId string, projectName string) (models.DatabaseUser, error) InsertRow(ctx context.Context, projectTag string, tableName string, row map[string]interface{}) error UpdateRow(ctx context.Context, useRowLevelSecurity bool, tpAccountId, projectTag string, tableName string, id int, row map[string]interface{}) error DeleteRow(ctx context.Context, useRowLevelSecurity bool, tpAccountId, projectTag string, tableName string, id int, filters ConditionGroup) error SelectRows(ctx context.Context, useRowLevelSecurity bool, tpAccountId, projectTag string, tableName string, columns []string, functions []Function, filters ConditionGroup, orderBy string, descending bool, offset int, size int) (map[string]interface{}, error) SelectRowById(ctx context.Context, useRowLevelSecurity bool, tpAccountId, projectTag string, tableName string, id int) (map[string]interface{}, error) CreateViewsTable(db *dbPkg.DB) (err error) DeleteView(ctx context.Context, accountId string, projectName string, viewName string) error GetViewsList(ctx context.Context, accountId string, projectName string) ([]models.DatabaseView, error) GetViewDetails(ctx context.Context, accountId string, projectName string, viewName string) (models.DatabaseView, error) GetViewDetailsByProjectTag(ctx context.Context, projectTag string, viewName string) (models.DatabaseView, error) UpsertView(ctx context.Context, accountId string, projectName string, viewName string, tableName string, columns []string, filters ConditionGroup, jsonQuery map[string]interface{}, isPublic bool) error RunViewQuery(ctx context.Context, useRowLevelSecurity bool, tpAccountId, projectTag string, viewName string, offset int, limit int) (map[string]interface{}, error) IsViewPublic(ctx context.Context, projectTag string, viewName string) (bool, error) AddDatabaseJob(ctx context.Context, dbJob models.DatabaseJob) error SetDatabaseJobStatus(ctx context.Context, accountId, projectName, jobType, status string) error GetDatabaseJob(ctx context.Context, accountId string, projectName string) (models.DatabaseJob, error) }
func New ¶
func New(db *dbPkg.DB) DatabaseStore
Source Files ¶
- add_database_job.go
- add_table.go
- add_table_column.go
- create_views_table.go
- database_store.go
- delete_database.go
- delete_database_user.go
- delete_row.go
- delete_table.go
- delete_table_column.go
- delete_view.go
- get_database_job.go
- get_database_user.go
- get_tables_list.go
- get_view_details.go
- get_views_list.go
- insert_row.go
- is_table_public.go
- is_view_public.go
- is_write_to_table_public.go
- list_table_columns.go
- run_database_query.go
- run_view_query.go
- select_row_by_id.go
- select_rows.go
- set_database_job_status.go
- set_table_access.go
- set_write_to_table_access.go
- update_row.go
- upsert_view.go
Click to show internal directories.
Click to hide internal directories.