Documentation
¶
Index ¶
- Variables
- func AlterTableAddFieldSQL(engine, tableName string, f *models.FieldInfo) ([]string, error)
- func ApplySQLiteConnectionPragmas(ctx context.Context, orm *bun.DB, engine, dsn string) error
- func BuildCombinedMetaQuery(keys dataloader.Keys, param *QueryBuilderParam) ([]byte, error)
- func BuildCombinedRelationQuery(cfg *models.Config, relationType string, parentModel string, ...) (string, []interface{}, *string, error)
- func BuildPostgresDSN(c *models.DriverCredentials) (string, error)
- func CommonDocTransformation(model *models.ModelType, local string, result map[string]interface{}, ...) (*types.DefaultDocumentStructure, error)
- func ConditionBuilder(variable string, args map[string]interface{}, modelType *models.ModelType, ...) (map[string][]string, error)
- func FilterBuilder(variable string, where map[string]interface{}, modelType *models.ModelType, ...) ([]string, error)
- func LimitBuilder(param *graphql.ResolveParams) (int, int)
- func MediaDocTransformation(docType string, result map[string]interface{}) (*models.FileDetails, error)
- func PhysicalSQLColumnForSystemRelationField(identifier string) string
- func QuoteMySQLIdent(s string) string
- func QuotePGIdent(s string) string
- func RootConnectionResolverQueryBuilder(cfg *models.Config, param *models.CommonSystemParams) (string, error)
- func RootResolverMediaQueryBuilder(param *graphql.ResolveParams) (string, error)
- func RootResolverQueryBuilder(cfg *models.Config, param *models.CommonSystemParams, returnCount bool) (string, []interface{}, error)
- func RunAnalyzeAfterIndexDDL(ctx context.Context, S *SQLDriver)
- func RunSQLiteLikePostDDL(ctx context.Context, S *SQLDriver) error
- func SelectBuilder(mv string, local string, modelType *models.ModelType, returnCount bool) []string
- func StripArangoEnvelopeKeysForSQLInsert(data map[string]interface{}, param *models.CommonSystemParams)
- type FieldClassification
- type Meta2
- type QueryBuilderParam
- type SQLDriver
- func (S *SQLDriver) AddATeamMemberToProject(ctx context.Context, req *models.TeamMemberAddRequest) error
- func (S *SQLDriver) AddAuthAddOns(ctx context.Context, project *models.Project, auth map[string]interface{}) error
- func (S *SQLDriver) AddDocumentToProject(ctx context.Context, param *models.CommonSystemParams, ...) (interface{}, error)
- func (S *SQLDriver) AddFieldToModel(ctx context.Context, param *models.CommonSystemParams, isUpdate bool, ...) (*models.ModelType, error)
- func (S *SQLDriver) AddModel(ctx context.Context, project *models.Project, model *models.ModelType) (*models.ProjectSchema, error)
- func (S *SQLDriver) AddRelationFields(ctx context.Context, from *models.ConnectionType, to *models.ConnectionType) error
- func (s *SQLDriver) AddRelationFields_AUTOGEN(ctx context.Context, from *models.ConnectionType, to *models.ConnectionType) error
- func (s *SQLDriver) AddTeamMetaInfo(ctx context.Context, docs []*models.SystemUser) ([]*models.SystemUser, error)
- func (s *SQLDriver) AggregateDocOfProject(ctx context.Context, param *models.CommonSystemParams) (interface{}, error)
- func (s *SQLDriver) AggregateDocOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
- func (S *SQLDriver) BuildFieldClassification(_fields []*models.FieldInfo) *FieldClassification
- func (s *SQLDriver) CheckOneToOneRelationExists(ctx context.Context, param *models.ConnectDisconnectParam) (bool, error)
- func (S *SQLDriver) CheckProjectExists(ctx context.Context, projectId string) (bool, error)
- func (a *SQLDriver) CheckTableOrCollectionExists(ctx context.Context, param *models.CommonSystemParams) (bool, error)
- func (p *SQLDriver) Close() error
- func (S *SQLDriver) ConnectBuilder(ctx context.Context, root *models.CommonSystemParams) error
- func (s *SQLDriver) ConvertModel(ctx context.Context, project *models.Project, modelName string) error
- func (S *SQLDriver) CountDocOfProject(ctx context.Context, param *models.CommonSystemParams) (interface{}, error)
- func (S *SQLDriver) CountDocOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
- func (S *SQLDriver) CountMedias(ctx context.Context, projectId string, param *graphql.ResolveParams) (int, error)
- func (f *SQLDriver) CountMultiDocumentOfProject(ctx context.Context, param *models.CommonSystemParams, previewMode bool) (int, error)
- func (s *SQLDriver) CreateIndex(ctx context.Context, param *models.CommonSystemParams, fieldName string, ...) error
- func (S *SQLDriver) CreateMediaDocument(ctx context.Context, projectId string, media *models.FileDetails) (*models.FileDetails, error)
- func (S *SQLDriver) CreateModelTable(ctx context.Context, model *models.ModelType, ifNotExists bool) error
- func (s *SQLDriver) CreateRelation(ctx context.Context, projectId string, relation *models.EdgeRelation) error
- func (S *SQLDriver) CreateTableOrCollection(ctx context.Context, param *models.CommonSystemParams, indexes []string) error
- func (S *SQLDriver) DeleteDocumentFromProject(ctx context.Context, param *models.CommonSystemParams) error
- func (s *SQLDriver) DeleteDocumentRelation(ctx context.Context, param *models.CommonSystemParams) error
- func (s *SQLDriver) DeleteDocumentsFromProject(ctx context.Context, param *models.CommonSystemParams) error
- func (s *SQLDriver) DeleteMediaFile(ctx context.Context, param models.CommonSystemParams) error
- func (S *SQLDriver) DeleteProject(ctx context.Context, projectId string) error
- func (S *SQLDriver) DeleteProjectBase(ctx context.Context, param *models.CommonSystemParams) error
- func (s *SQLDriver) DeleteRelation(ctx context.Context, param *models.ConnectDisconnectParam, id string) error
- func (S *SQLDriver) DeleteRelationDocuments(ctx context.Context, projectId string, from *models.ConnectionType, ...) error
- func (s *SQLDriver) DeleteRelationDocuments_AUTOGEN(ctx context.Context, projectId string, from *models.ConnectionType, ...) error
- func (S *SQLDriver) DisconnectBuilder(ctx context.Context, param *models.CommonSystemParams) error
- func (S *SQLDriver) DropField(ctx context.Context, param *models.CommonSystemParams) error
- func (s *SQLDriver) DropIndex(ctx context.Context, param *models.CommonSystemParams, indexName string) error
- func (s *SQLDriver) DropModel(ctx context.Context, project *models.Project, modelName string) error
- func (s *SQLDriver) DuplicateModel(ctx context.Context, project *models.Project, modelName, newName string) (*models.ProjectSchema, error)
- func (S *SQLDriver) EnsureMetaMediaTables(ctx context.Context) error
- func (S *SQLDriver) EnsureModelUserFieldColumns(ctx context.Context, model *models.ModelType) error
- func (S *SQLDriver) EnsureRelationArtifactsFromSchema(ctx context.Context, modelsList []*models.ModelType) error
- func (S *SQLDriver) EnsureSchemaOptimizationsV1(ctx context.Context) error
- func (S *SQLDriver) GetAllRelationDocumentsOfSingleDocument(ctx context.Context, from string, arg *models.CommonSystemParams) (interface{}, error)
- func (s *SQLDriver) GetAllRelationDocumentsOfSingleDocument_AUTOGEN(ctx context.Context, from string, arg *models.CommonSystemParams) (interface{}, error)
- func (s *SQLDriver) GetLoggedInProjectUser(ctx context.Context, param *models.CommonSystemParams) (*types.DefaultDocumentStructure, error)
- func (s *SQLDriver) GetProjectUser(ctx context.Context, phone, email, projectId string) (*types.DefaultDocumentStructure, error)
- func (s *SQLDriver) GetProjectUsers(ctx context.Context, projectId string, keys []string) (map[string]*types.DefaultDocumentStructure, error)
- func (s *SQLDriver) GetRelationDocument(ctx context.Context, param *models.ConnectDisconnectParam) (*models.EdgeRelation, error)
- func (s *SQLDriver) GetRelationIds(ctx context.Context, param *models.ConnectDisconnectParam) ([]string, error)
- func (S *SQLDriver) GetSingleProjectDocument(ctx context.Context, param *models.CommonSystemParams) (*types.DefaultDocumentStructure, error)
- func (S *SQLDriver) GetSingleProjectDocumentBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
- func (s *SQLDriver) GetSingleProjectDocumentRevisions(ctx context.Context, param *models.CommonSystemParams) ([]*models.DocumentRevisionHistory, error)
- func (S *SQLDriver) GetSingleRawDocumentFromProject(ctx context.Context, param *models.CommonSystemParams) (interface{}, error)
- func (S *SQLDriver) InitProjectBase(ctx context.Context, param *models.CommonSystemParams, indexes []string) error
- func (S *SQLDriver) ListMedias(ctx context.Context, projectId string, param *graphql.ResolveParams) ([]*models.FileDetails, error)
- func (s *SQLDriver) NewInsertableRelations(ctx context.Context, param *models.ConnectDisconnectParam) ([]string, error)
- func (p *SQLDriver) Ping() error
- func (S *SQLDriver) QueryMultiDocumentOfProject(ctx context.Context, param *models.CommonSystemParams) ([]*types.DefaultDocumentStructure, error)
- func (S *SQLDriver) QueryMultiDocumentOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
- func (S *SQLDriver) RelationshipDataLoader(ctx context.Context, param *models.CommonSystemParams, ...) (interface{}, error)
- func (S *SQLDriver) RelationshipDataLoaderBytes(ctx context.Context, param *models.CommonSystemParams, ...) ([]byte, error)
- func (S *SQLDriver) RemoveATeamMemberFromProject(ctx context.Context, projectId string, memberId string) error
- func (a *SQLDriver) RemoveAuthAddOns(ctx context.Context, project *models.Project, option map[string]interface{}) error
- func (s *SQLDriver) RenameField(ctx context.Context, oldFieldName string, repeatedFieldGroup string, ...) error
- func (s *SQLDriver) RenameModel(ctx context.Context, project *models.Project, modelName, newName string) error
- func (S *SQLDriver) TransferProject(ctx context.Context, userId, from, to string) error
- func (S *SQLDriver) UpdateDocumentOfProject(ctx context.Context, param *models.CommonSystemParams, ...) error
Constants ¶
This section is empty.
Variables ¶
var FilterSuffix = map[string]string{
"eq": "==",
"ne": "!=",
"lt": "<",
"lte": "<=",
"gt": ">",
"gte": ">=",
"in": "IN",
"not_in": "NOT IN",
}
Functions ¶
func AlterTableAddFieldSQL ¶ added in v1.6.1
AlterTableAddFieldSQL returns DDL statements to add physical column(s) for one FieldInfo (locals expand to multiple columns). Engine must match DriverCredentials.Engine (e.g. postgresql, sqlite, libsql, mysql).
func ApplySQLiteConnectionPragmas ¶ added in v1.6.1
ApplySQLiteConnectionPragmas sets FK enforcement and performance-related PRAGMAs for SQLite/libsql. For remote Turso/libsql URLs, WAL/mmap are skipped (not applicable or not supported the same way).
func BuildCombinedMetaQuery ¶
func BuildCombinedMetaQuery(keys dataloader.Keys, param *QueryBuilderParam) ([]byte, error)
func BuildPostgresDSN ¶ added in v1.6.0
func BuildPostgresDSN(c *models.DriverCredentials) (string, error)
BuildPostgresDSN builds a libpq URL for pgdriver from credentials (sslmode from SSLMode, default disable).
func CommonDocTransformation ¶
func CommonDocTransformation(model *models.ModelType, local string, result map[string]interface{}, classification *FieldClassification) (*types.DefaultDocumentStructure, error)
func ConditionBuilder ¶
func FilterBuilder ¶
func LimitBuilder ¶
func LimitBuilder(param *graphql.ResolveParams) (int, int)
func MediaDocTransformation ¶
func MediaDocTransformation(docType string, result map[string]interface{}) (*models.FileDetails, error)
func PhysicalSQLColumnForSystemRelationField ¶ added in v1.6.1
PhysicalSQLColumnForSystemRelationField maps GraphQL/schema synthetic relation keys (system_<model>_id or system_<model>_as_<knownAs>_id) to physical FK column names created by AddRelationFields (<singular_model>_id). Non-matching identifiers are returned unchanged.
func QuoteMySQLIdent ¶ added in v1.6.0
QuoteMySQLIdent returns a MySQL backtick-quoted identifier for DDL.
func QuotePGIdent ¶ added in v1.6.0
QuotePGIdent returns a PostgreSQL double-quoted identifier for DDL.
func RootResolverMediaQueryBuilder ¶
func RootResolverMediaQueryBuilder(param *graphql.ResolveParams) (string, error)
func RunAnalyzeAfterIndexDDL ¶ added in v1.6.1
RunAnalyzeAfterIndexDDL refreshes planner statistics after CREATE INDEX on SQLite-like engines.
func RunSQLiteLikePostDDL ¶ added in v1.6.1
RunSQLiteLikePostDDL runs ANALYZE on SQLite-like engines after DDL changes.
func SelectBuilder ¶
func StripArangoEnvelopeKeysForSQLInsert ¶ added in v1.6.1
func StripArangoEnvelopeKeysForSQLInsert(data map[string]interface{}, param *models.CommonSystemParams)
StripArangoEnvelopeKeysForSQLInsert removes *DefaultDocumentStructure merge keys that SQL model DDL does not provision (PK is `id`; _key/_id are Arango compat; `type` mirrors the table when no field named type). Shared-DB SaaS only adds a physical tenant_id column (see prosql.ApplyModelPhysicalDDL); tenant_model is document metadata for drivers that store it in JSON/ext, not a SQL column.
Types ¶
type FieldClassification ¶
type Meta2 ¶
type Meta2 struct {
ID string `gorm:"primaryKey;column:id;not null"`
DocID string `gorm:"column:doc_id;not null"`
CreatedAt time.Time `gorm:"column:created_at;not null;default:current_date"`
UpdatedAt time.Time `gorm:"column:updated_at;not null;default:current_date"`
CreatedBy string `gorm:"column:created_by;not null"`
UpdatedBy string `gorm:"column:updated_by;not null"`
Status string `gorm:"column:status;not null"`
}
type QueryBuilderParam ¶
type SQLDriver ¶
type SQLDriver struct {
Conf *models.Config
ORM *bun.DB
DriverCredential *models.DriverCredentials
}
func GetSQLDriver ¶
func (*SQLDriver) AddATeamMemberToProject ¶
func (*SQLDriver) AddAuthAddOns ¶
func (*SQLDriver) AddDocumentToProject ¶
func (S *SQLDriver) AddDocumentToProject(ctx context.Context, param *models.CommonSystemParams, doc *types.DefaultDocumentStructure) (interface{}, error)
func (*SQLDriver) AddFieldToModel ¶
func (*SQLDriver) AddRelationFields ¶
func (S *SQLDriver) AddRelationFields(ctx context.Context, from *models.ConnectionType, to *models.ConnectionType) error
func (*SQLDriver) AddRelationFields_AUTOGEN ¶
func (s *SQLDriver) AddRelationFields_AUTOGEN(ctx context.Context, from *models.ConnectionType, to *models.ConnectionType) error
AddRelationFields creates a relation field (has one or has many) between models.
func (*SQLDriver) AddTeamMetaInfo ¶
func (s *SQLDriver) AddTeamMetaInfo(ctx context.Context, docs []*models.SystemUser) ([]*models.SystemUser, error)
AddTeamMetaInfo adds metadata information for a team in the project.
func (*SQLDriver) AggregateDocOfProject ¶
func (s *SQLDriver) AggregateDocOfProject(ctx context.Context, param *models.CommonSystemParams) (interface{}, error)
AggregateDocOfProject aggregates the documents in the project. Uses the same SQL shape as CountDocOfProject (RootResolverQueryBuilder with returnCount=true) so filters, tenant QueryFilterHook, and role-based predicates match list/count behavior.
func (*SQLDriver) AggregateDocOfProjectBytes ¶
func (s *SQLDriver) AggregateDocOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
AggregateDocOfProjectBytes aggregates the documents in the project and returns it as bytes.
func (*SQLDriver) BuildFieldClassification ¶
func (S *SQLDriver) BuildFieldClassification(_fields []*models.FieldInfo) *FieldClassification
func (*SQLDriver) CheckOneToOneRelationExists ¶
func (s *SQLDriver) CheckOneToOneRelationExists(ctx context.Context, param *models.ConnectDisconnectParam) (bool, error)
CheckOneToOneRelationExists checks if a one-to-one relation exists in the project.
func (*SQLDriver) CheckProjectExists ¶
func (*SQLDriver) CheckTableOrCollectionExists ¶ added in v1.6.0
func (*SQLDriver) Close ¶ added in v1.6.0
Close implements database.Closeable so ConnectionManager can release *sql.DB on eviction.
func (*SQLDriver) ConnectBuilder ¶
func (*SQLDriver) ConvertModel ¶
func (s *SQLDriver) ConvertModel(ctx context.Context, project *models.Project, modelName string) error
ConvertModel converts a model in the project.
func (*SQLDriver) CountDocOfProject ¶
func (*SQLDriver) CountDocOfProjectBytes ¶
func (*SQLDriver) CountMedias ¶
func (*SQLDriver) CountMultiDocumentOfProject ¶
func (*SQLDriver) CreateIndex ¶
func (s *SQLDriver) CreateIndex(ctx context.Context, param *models.CommonSystemParams, fieldName string, parent_field string) error
CreateIndex creates an index for a model in the project.
func (*SQLDriver) CreateMediaDocument ¶
func (S *SQLDriver) CreateMediaDocument(ctx context.Context, projectId string, media *models.FileDetails) (*models.FileDetails, error)
func (*SQLDriver) CreateModelTable ¶ added in v1.6.0
func (S *SQLDriver) CreateModelTable(ctx context.Context, model *models.ModelType, ifNotExists bool) error
CreateModelTable creates a model table with only an id primary key column. Use ifNotExists to guard against duplicate table errors during provisioning.
func (*SQLDriver) CreateRelation ¶
func (s *SQLDriver) CreateRelation(ctx context.Context, projectId string, relation *models.EdgeRelation) error
CreateRelation creates a relation in the project.
func (*SQLDriver) CreateTableOrCollection ¶ added in v1.6.0
func (S *SQLDriver) CreateTableOrCollection(ctx context.Context, param *models.CommonSystemParams, indexes []string) error
CreateTableOrCollection creates the physical table for param.Model only. Project bootstrap (database + meta + media) is handled by InitProjectBase.
func (*SQLDriver) DeleteDocumentFromProject ¶
func (*SQLDriver) DeleteDocumentRelation ¶
func (s *SQLDriver) DeleteDocumentRelation(ctx context.Context, param *models.CommonSystemParams) error
DeleteDocumentRelation deletes all relations or data in pivot tables from the project.
func (*SQLDriver) DeleteDocumentsFromProject ¶
func (s *SQLDriver) DeleteDocumentsFromProject(ctx context.Context, param *models.CommonSystemParams) error
DeleteDocumentsFromProject deletes multiple documents from the project.
func (*SQLDriver) DeleteMediaFile ¶
DeleteMediaFile deletes a media file from the project.
func (*SQLDriver) DeleteProject ¶
DeleteProject removes project storage: dedicated database for PostgreSQL / MySQL, or core tables for SQLite.
func (*SQLDriver) DeleteProjectBase ¶ added in v1.6.0
DeleteProjectBase drops meta and media in the current database (SQLite file-backed layout).
func (*SQLDriver) DeleteRelation ¶
func (s *SQLDriver) DeleteRelation(ctx context.Context, param *models.ConnectDisconnectParam, id string) error
DeleteRelation deletes a relation in the project.
func (*SQLDriver) DeleteRelationDocuments ¶
func (S *SQLDriver) DeleteRelationDocuments(ctx context.Context, projectId string, from *models.ConnectionType, to *models.ConnectionType) error
func (*SQLDriver) DeleteRelationDocuments_AUTOGEN ¶
func (s *SQLDriver) DeleteRelationDocuments_AUTOGEN(ctx context.Context, projectId string, from *models.ConnectionType, to *models.ConnectionType) error
DeleteRelationDocuments drops pivot tables, relation keys, or collection tables and all documents within them.
func (*SQLDriver) DisconnectBuilder ¶
func (*SQLDriver) DropIndex ¶
func (s *SQLDriver) DropIndex(ctx context.Context, param *models.CommonSystemParams, indexName string) error
DropIndex drops an index from a model in the project.
func (*SQLDriver) DuplicateModel ¶
func (s *SQLDriver) DuplicateModel(ctx context.Context, project *models.Project, modelName, newName string) (*models.ProjectSchema, error)
DuplicateModel duplicates a model in the project.
func (*SQLDriver) EnsureMetaMediaTables ¶ added in v1.6.0
EnsureMetaMediaTables creates meta and media tables when missing (idempotent).
func (*SQLDriver) EnsureModelUserFieldColumns ¶ added in v1.6.1
EnsureModelUserFieldColumns runs ALTER TABLE ADD for each top-level model.Fields entry so physical tables match schema (e.g. SaaS tenant catalogue name/logo after CreateModelTable created id-only table). Idempotent: duplicate column errors are ignored.
func (*SQLDriver) EnsureRelationArtifactsFromSchema ¶ added in v1.6.1
func (S *SQLDriver) EnsureRelationArtifactsFromSchema(ctx context.Context, modelsList []*models.ModelType) error
EnsureRelationArtifactsFromSchema creates missing SQL artifacts for schema-declared relations (has_many↔has_many pivot tables via AddRelationFields). Idempotent: pivot CREATE uses IF NOT EXISTS. Needed when projects were authored on Arango (edges only) or bootstrap only created model tables.
func (*SQLDriver) EnsureSchemaOptimizationsV1 ¶ added in v1.6.1
EnsureSchemaOptimizationsV1 applies idempotent secondary indexes and document_revisions bootstrap for project databases created before meta/media secondary indexes existed. Uses _apito_db_meta sentinel so work runs at most once per database.
func (*SQLDriver) GetAllRelationDocumentsOfSingleDocument ¶
func (*SQLDriver) GetAllRelationDocumentsOfSingleDocument_AUTOGEN ¶
func (s *SQLDriver) GetAllRelationDocumentsOfSingleDocument_AUTOGEN(ctx context.Context, from string, arg *models.CommonSystemParams) (interface{}, error)
GetAllRelationDocumentsOfSingleDocument retrieves all relation data of a single document by ID.
func (*SQLDriver) GetLoggedInProjectUser ¶
func (s *SQLDriver) GetLoggedInProjectUser(ctx context.Context, param *models.CommonSystemParams) (*types.DefaultDocumentStructure, error)
GetLoggedInProjectUser retrieves the logged-in user profile for the project.
func (*SQLDriver) GetProjectUser ¶
func (s *SQLDriver) GetProjectUser(ctx context.Context, phone, email, projectId string) (*types.DefaultDocumentStructure, error)
GetProjectUser retrieves a user profile by phone, email, and project ID.
func (*SQLDriver) GetProjectUsers ¶
func (s *SQLDriver) GetProjectUsers(ctx context.Context, projectId string, keys []string) (map[string]*types.DefaultDocumentStructure, error)
GetProjectUsers retrieves metadata for multiple users in the project.
func (*SQLDriver) GetRelationDocument ¶
func (s *SQLDriver) GetRelationDocument(ctx context.Context, param *models.ConnectDisconnectParam) (*models.EdgeRelation, error)
GetRelationDocument retrieves a relation document by ID.
func (*SQLDriver) GetRelationIds ¶
func (s *SQLDriver) GetRelationIds(ctx context.Context, param *models.ConnectDisconnectParam) ([]string, error)
GetRelationIds retrieves the IDs of every document related to a document.
func (*SQLDriver) GetSingleProjectDocument ¶
func (S *SQLDriver) GetSingleProjectDocument(ctx context.Context, param *models.CommonSystemParams) (*types.DefaultDocumentStructure, error)
func (*SQLDriver) GetSingleProjectDocumentBytes ¶
func (*SQLDriver) GetSingleProjectDocumentRevisions ¶
func (s *SQLDriver) GetSingleProjectDocumentRevisions(ctx context.Context, param *models.CommonSystemParams) ([]*models.DocumentRevisionHistory, error)
GetSingleProjectDocumentRevisions retrieves the revision history of a single project document by ID.
func (*SQLDriver) GetSingleRawDocumentFromProject ¶
func (*SQLDriver) InitProjectBase ¶ added in v1.6.0
func (S *SQLDriver) InitProjectBase(ctx context.Context, param *models.CommonSystemParams, indexes []string) error
InitProjectBase creates the per-project database (PostgreSQL / MySQL) when needed, reconnects, and ensures meta + media tables. For SQLite it only ensures meta + media in the current file.
func (*SQLDriver) ListMedias ¶
func (S *SQLDriver) ListMedias(ctx context.Context, projectId string, param *graphql.ResolveParams) ([]*models.FileDetails, error)
func (*SQLDriver) NewInsertableRelations ¶
func (s *SQLDriver) NewInsertableRelations(ctx context.Context, param *models.ConnectDisconnectParam) ([]string, error)
NewInsertableRelations retrieves new insertable relations in the project.
func (*SQLDriver) QueryMultiDocumentOfProject ¶
func (S *SQLDriver) QueryMultiDocumentOfProject(ctx context.Context, param *models.CommonSystemParams) ([]*types.DefaultDocumentStructure, error)
func (*SQLDriver) QueryMultiDocumentOfProjectBytes ¶
func (*SQLDriver) RelationshipDataLoader ¶
func (*SQLDriver) RelationshipDataLoaderBytes ¶
func (*SQLDriver) RemoveATeamMemberFromProject ¶
func (*SQLDriver) RemoveAuthAddOns ¶
func (*SQLDriver) RenameField ¶
func (s *SQLDriver) RenameField(ctx context.Context, oldFieldName string, repeatedFieldGroup string, param *models.CommonSystemParams) error
RenameField renames a field in a model along with its data key.
func (*SQLDriver) RenameModel ¶
func (s *SQLDriver) RenameModel(ctx context.Context, project *models.Project, modelName, newName string) error
RenameModel renames a model in the project.
func (*SQLDriver) TransferProject ¶
func (*SQLDriver) UpdateDocumentOfProject ¶
func (S *SQLDriver) UpdateDocumentOfProject(ctx context.Context, param *models.CommonSystemParams, doc *types.DefaultDocumentStructure, replace bool) error