Documentation
¶
Index ¶
- type MariaDBDriver
- func (m *MariaDBDriver) AddCollection(ctx context.Context, param *models.CommonSystemParams) error
- func (m *MariaDBDriver) AddDocumentToProject(ctx context.Context, param *models.CommonSystemParams, ...) (interface{}, error)
- func (m *MariaDBDriver) AddFieldToModel(ctx context.Context, param *models.CommonSystemParams, isUpdate bool, ...) (*models.ModelType, error)
- func (m *MariaDBDriver) AddModel(ctx context.Context, project *models.Project, model *models.ModelType) (*models.ProjectSchema, error)
- func (m *MariaDBDriver) AddRelationFields(ctx context.Context, param *models.CommonSystemParams, ...) error
- func (m *MariaDBDriver) AddTeamMetaInfo(ctx context.Context, param *models.CommonSystemParams, ...) (*types.DefaultDocumentStructure, error)
- func (m *MariaDBDriver) AggregateDocOfProject(ctx context.Context, param *models.CommonSystemParams, pipeline interface{}) (interface{}, error)
- func (m *MariaDBDriver) AggregateDocOfProjectBytes(ctx context.Context, param *models.CommonSystemParams, pipeline interface{}) ([]byte, error)
- func (m *MariaDBDriver) CheckCollectionExists(ctx context.Context, param *models.CommonSystemParams, ...) (bool, error)
- func (m *MariaDBDriver) CheckOneToOneRelationExists(ctx context.Context, param *models.CommonSystemParams, ...) (bool, error)
- func (m *MariaDBDriver) Close() error
- func (m *MariaDBDriver) ConnectBuilder(ctx context.Context, projectId, userId string) error
- func (m *MariaDBDriver) ConvertModel(ctx context.Context, project *models.Project, modelName string) error
- func (m *MariaDBDriver) CountDocOfProject(ctx context.Context, param *models.CommonSystemParams) (int, error)
- func (m *MariaDBDriver) CountDocOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) (int, error)
- func (m *MariaDBDriver) CountMultiDocumentOfProject(ctx context.Context, param *models.CommonSystemParams, ...) (int, error)
- func (m *MariaDBDriver) CreateIndex(ctx context.Context, param *models.CommonSystemParams, fieldName string, ...) error
- func (m *MariaDBDriver) CreateRelation(ctx context.Context, param *models.CommonSystemParams, ...) (*types.DefaultDocumentStructure, error)
- func (m *MariaDBDriver) DeleteDocumentFromProject(ctx context.Context, param *models.CommonSystemParams) error
- func (m *MariaDBDriver) DeleteDocumentRelation(ctx context.Context, param *models.CommonSystemParams) error
- func (m *MariaDBDriver) DeleteDocumentsFromProject(ctx context.Context, param *models.CommonSystemParams) error
- func (m *MariaDBDriver) DeleteMediaFile(ctx context.Context, param *models.CommonSystemParams) error
- func (m *MariaDBDriver) DeleteProject(ctx context.Context, projectID string) error
- func (m *MariaDBDriver) DeleteRelation(ctx context.Context, param *models.CommonSystemParams, relationID string) error
- func (m *MariaDBDriver) DeleteRelationDocuments(ctx context.Context, param *models.CommonSystemParams, relationshipName string) error
- func (m *MariaDBDriver) DisconnectBuilder(ctx context.Context, projectId, userId string) error
- func (m *MariaDBDriver) DropField(ctx context.Context, param *models.CommonSystemParams, fieldName string) error
- func (m *MariaDBDriver) DropIndex(ctx context.Context, param *models.CommonSystemParams, indexName string) error
- func (m *MariaDBDriver) DropModel(ctx context.Context, project *models.Project, modelName string) error
- func (m *MariaDBDriver) DuplicateModel(ctx context.Context, param *models.CommonSystemParams, newModelName string) error
- func (m *MariaDBDriver) GetAllRelationDocumentsOfSingleDocument(ctx context.Context, param *models.CommonSystemParams, documentID string) ([]*types.DefaultDocumentStructure, error)
- func (m *MariaDBDriver) GetLoggedInProjectUser(ctx context.Context, projectId, userId string) (*types.DefaultDocumentStructure, error)
- func (m *MariaDBDriver) GetProjectUser(ctx context.Context, projectId, email, phone string) (*types.DefaultDocumentStructure, error)
- func (m *MariaDBDriver) GetProjectUsers(ctx context.Context, projectId string, userIds []string) ([]*types.DefaultDocumentStructure, error)
- func (m *MariaDBDriver) GetRelationDocument(ctx context.Context, cd *models.ConnectDisconnectParam) (*types.DefaultDocumentStructure, error)
- func (m *MariaDBDriver) GetRelationIds(ctx context.Context, param *models.CommonSystemParams, ...) ([]string, error)
- func (m *MariaDBDriver) GetSingleProjectDocument(ctx context.Context, param *models.CommonSystemParams) (*types.DefaultDocumentStructure, error)
- func (m *MariaDBDriver) GetSingleProjectDocumentBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
- func (m *MariaDBDriver) GetSingleProjectDocumentRevisions(ctx context.Context, param *models.CommonSystemParams) ([]*types.DefaultDocumentStructure, error)
- func (m *MariaDBDriver) GetSingleRawDocumentFromProject(ctx context.Context, param *models.CommonSystemParams) (interface{}, error)
- func (m *MariaDBDriver) NewInsertableRelations(ctx context.Context, param *models.CommonSystemParams, ...) ([]*types.DefaultDocumentStructure, error)
- func (m *MariaDBDriver) QueryMultiDocumentOfProject(ctx context.Context, param *models.CommonSystemParams) ([]*types.DefaultDocumentStructure, error)
- func (m *MariaDBDriver) QueryMultiDocumentOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
- func (m *MariaDBDriver) RelationshipDataLoader(ctx context.Context, param *models.CommonSystemParams, ids []string) ([]*types.DefaultDocumentStructure, error)
- func (m *MariaDBDriver) RelationshipDataLoaderBytes(ctx context.Context, param *models.CommonSystemParams, ids []string) ([][]byte, error)
- func (m *MariaDBDriver) RenameField(ctx context.Context, param *models.CommonSystemParams, ...) error
- func (m *MariaDBDriver) RenameModel(ctx context.Context, project *models.Project, modelName, newName string) error
- func (m *MariaDBDriver) TransferProject(ctx context.Context, userId, from, to string) error
- func (m *MariaDBDriver) UpdateDocumentOfProject(ctx context.Context, param *models.CommonSystemParams, ...) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MariaDBDriver ¶
type MariaDBDriver struct { DB *sql.DB DriverCredential *models.DriverCredentials }
func GetMariaDBDriver ¶
func GetMariaDBDriver(driverCredentials *models.DriverCredentials) (*MariaDBDriver, error)
GetMariaDBDriver creates a new MariaDB project driver instance
func (*MariaDBDriver) AddCollection ¶
func (m *MariaDBDriver) AddCollection(ctx context.Context, param *models.CommonSystemParams) error
AddCollection adds a new collection to the project
func (*MariaDBDriver) AddDocumentToProject ¶
func (m *MariaDBDriver) AddDocumentToProject(ctx context.Context, param *models.CommonSystemParams, doc *types.DefaultDocumentStructure) (interface{}, error)
AddDocumentToProject adds a new document to the project
func (*MariaDBDriver) AddFieldToModel ¶
func (m *MariaDBDriver) AddFieldToModel(ctx context.Context, param *models.CommonSystemParams, isUpdate bool, repeatedGroupIdentifier string) (*models.ModelType, error)
AddFieldToModel adds a new field to an existing model in the project
func (*MariaDBDriver) AddModel ¶
func (m *MariaDBDriver) AddModel(ctx context.Context, project *models.Project, model *models.ModelType) (*models.ProjectSchema, error)
AddModel adds a new model to the project
func (*MariaDBDriver) AddRelationFields ¶
func (m *MariaDBDriver) AddRelationFields(ctx context.Context, param *models.CommonSystemParams, sourceModel, targetModel, relationType string) error
AddRelationFields adds relation fields to a model (no-op for MariaDB)
func (*MariaDBDriver) AddTeamMetaInfo ¶
func (m *MariaDBDriver) AddTeamMetaInfo(ctx context.Context, param *models.CommonSystemParams, teamInfo *types.DefaultDocumentStructure) (*types.DefaultDocumentStructure, error)
AddTeamMetaInfo adds team meta info to a document
func (*MariaDBDriver) AggregateDocOfProject ¶
func (m *MariaDBDriver) AggregateDocOfProject(ctx context.Context, param *models.CommonSystemParams, pipeline interface{}) (interface{}, error)
AggregateDocOfProject performs aggregation on documents
func (*MariaDBDriver) AggregateDocOfProjectBytes ¶
func (m *MariaDBDriver) AggregateDocOfProjectBytes(ctx context.Context, param *models.CommonSystemParams, pipeline interface{}) ([]byte, error)
AggregateDocOfProjectBytes performs aggregation on documents (bytes version)
func (*MariaDBDriver) CheckCollectionExists ¶
func (m *MariaDBDriver) CheckCollectionExists(ctx context.Context, param *models.CommonSystemParams, isRelationCollection bool) (bool, error)
CheckCollectionExists checks if a collection exists in the project
func (*MariaDBDriver) CheckOneToOneRelationExists ¶
func (m *MariaDBDriver) CheckOneToOneRelationExists(ctx context.Context, param *models.CommonSystemParams, fromId, toId, relationName string) (bool, error)
CheckOneToOneRelationExists checks if a one-to-one relation already exists
func (*MariaDBDriver) Close ¶
func (m *MariaDBDriver) Close() error
Close closes the MariaDB database connection
func (*MariaDBDriver) ConnectBuilder ¶
func (m *MariaDBDriver) ConnectBuilder(ctx context.Context, projectId, userId string) error
ConnectBuilder connects a builder to the project
func (*MariaDBDriver) ConvertModel ¶
func (m *MariaDBDriver) ConvertModel(ctx context.Context, project *models.Project, modelName string) error
ConvertModel converts a model in the project (no-op for MariaDB)
func (*MariaDBDriver) CountDocOfProject ¶
func (m *MariaDBDriver) CountDocOfProject(ctx context.Context, param *models.CommonSystemParams) (int, error)
CountDocOfProject counts documents in a project
func (*MariaDBDriver) CountDocOfProjectBytes ¶
func (m *MariaDBDriver) CountDocOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) (int, error)
CountDocOfProjectBytes counts documents in a project (bytes version)
func (*MariaDBDriver) CountMultiDocumentOfProject ¶
func (m *MariaDBDriver) CountMultiDocumentOfProject(ctx context.Context, param *models.CommonSystemParams, condition map[string]interface{}) (int, error)
CountMultiDocumentOfProject counts multiple documents with filters
func (*MariaDBDriver) CreateIndex ¶
func (m *MariaDBDriver) CreateIndex(ctx context.Context, param *models.CommonSystemParams, fieldName string, repeatedGroupIdentifier string) error
CreateIndex creates an index for a model in the project
func (*MariaDBDriver) CreateRelation ¶
func (m *MariaDBDriver) CreateRelation(ctx context.Context, param *models.CommonSystemParams, relation *types.DefaultDocumentStructure) (*types.DefaultDocumentStructure, error)
CreateRelation creates a new relation between documents
func (*MariaDBDriver) DeleteDocumentFromProject ¶
func (m *MariaDBDriver) DeleteDocumentFromProject(ctx context.Context, param *models.CommonSystemParams) error
DeleteDocumentFromProject deletes a document from the project
func (*MariaDBDriver) DeleteDocumentRelation ¶
func (m *MariaDBDriver) DeleteDocumentRelation(ctx context.Context, param *models.CommonSystemParams) error
DeleteDocumentRelation deletes all relations or data in pivot tables from the project
func (*MariaDBDriver) DeleteDocumentsFromProject ¶
func (m *MariaDBDriver) DeleteDocumentsFromProject(ctx context.Context, param *models.CommonSystemParams) error
DeleteDocumentsFromProject deletes multiple documents from the project
func (*MariaDBDriver) DeleteMediaFile ¶
func (m *MariaDBDriver) DeleteMediaFile(ctx context.Context, param *models.CommonSystemParams) error
DeleteMediaFile deletes a media file document
func (*MariaDBDriver) DeleteProject ¶
func (m *MariaDBDriver) DeleteProject(ctx context.Context, projectID string) error
DeleteProject deletes a project and all related data
func (*MariaDBDriver) DeleteRelation ¶
func (m *MariaDBDriver) DeleteRelation(ctx context.Context, param *models.CommonSystemParams, relationID string) error
DeleteRelation deletes a specific relation
func (*MariaDBDriver) DeleteRelationDocuments ¶
func (m *MariaDBDriver) DeleteRelationDocuments(ctx context.Context, param *models.CommonSystemParams, relationshipName string) error
DeleteRelationDocuments deletes relation documents for a specific relation
func (*MariaDBDriver) DisconnectBuilder ¶
func (m *MariaDBDriver) DisconnectBuilder(ctx context.Context, projectId, userId string) error
DisconnectBuilder disconnects a builder from the project
func (*MariaDBDriver) DropField ¶
func (m *MariaDBDriver) DropField(ctx context.Context, param *models.CommonSystemParams, fieldName string) error
DropField drops a field from all documents in a collection
func (*MariaDBDriver) DropIndex ¶
func (m *MariaDBDriver) DropIndex(ctx context.Context, param *models.CommonSystemParams, indexName string) error
DropIndex drops an index from a model in the project
func (*MariaDBDriver) DropModel ¶
func (m *MariaDBDriver) DropModel(ctx context.Context, project *models.Project, modelName string) error
DropModel drops a model from the project
func (*MariaDBDriver) DuplicateModel ¶
func (m *MariaDBDriver) DuplicateModel(ctx context.Context, param *models.CommonSystemParams, newModelName string) error
DuplicateModel duplicates a model by copying all its documents
func (*MariaDBDriver) GetAllRelationDocumentsOfSingleDocument ¶
func (m *MariaDBDriver) GetAllRelationDocumentsOfSingleDocument(ctx context.Context, param *models.CommonSystemParams, documentID string) ([]*types.DefaultDocumentStructure, error)
GetAllRelationDocumentsOfSingleDocument gets all relation documents for a single document
func (*MariaDBDriver) GetLoggedInProjectUser ¶
func (m *MariaDBDriver) GetLoggedInProjectUser(ctx context.Context, projectId, userId string) (*types.DefaultDocumentStructure, error)
GetLoggedInProjectUser gets a logged-in project user by user ID
func (*MariaDBDriver) GetProjectUser ¶
func (m *MariaDBDriver) GetProjectUser(ctx context.Context, projectId, email, phone string) (*types.DefaultDocumentStructure, error)
GetProjectUser gets a project user by email or phone
func (*MariaDBDriver) GetProjectUsers ¶
func (m *MariaDBDriver) GetProjectUsers(ctx context.Context, projectId string, userIds []string) ([]*types.DefaultDocumentStructure, error)
GetProjectUsers gets project users by their IDs
func (*MariaDBDriver) GetRelationDocument ¶
func (m *MariaDBDriver) GetRelationDocument(ctx context.Context, cd *models.ConnectDisconnectParam) (*types.DefaultDocumentStructure, error)
GetRelationDocument retrieves a relation document
func (*MariaDBDriver) GetRelationIds ¶
func (m *MariaDBDriver) GetRelationIds(ctx context.Context, param *models.CommonSystemParams, documentID, relationName string) ([]string, error)
GetRelationIds gets relation IDs for a document
func (*MariaDBDriver) GetSingleProjectDocument ¶
func (m *MariaDBDriver) GetSingleProjectDocument(ctx context.Context, param *models.CommonSystemParams) (*types.DefaultDocumentStructure, error)
GetSingleProjectDocument retrieves a single document by its ID
func (*MariaDBDriver) GetSingleProjectDocumentBytes ¶
func (m *MariaDBDriver) GetSingleProjectDocumentBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
GetSingleProjectDocumentBytes retrieves a single document as bytes
func (*MariaDBDriver) GetSingleProjectDocumentRevisions ¶
func (m *MariaDBDriver) GetSingleProjectDocumentRevisions(ctx context.Context, param *models.CommonSystemParams) ([]*types.DefaultDocumentStructure, error)
GetSingleProjectDocumentRevisions retrieves document revisions
func (*MariaDBDriver) GetSingleRawDocumentFromProject ¶
func (m *MariaDBDriver) GetSingleRawDocumentFromProject(ctx context.Context, param *models.CommonSystemParams) (interface{}, error)
GetSingleRawDocumentFromProject retrieves a raw document
func (*MariaDBDriver) NewInsertableRelations ¶
func (m *MariaDBDriver) NewInsertableRelations(ctx context.Context, param *models.CommonSystemParams, relations []*types.DefaultDocumentStructure) ([]*types.DefaultDocumentStructure, error)
NewInsertableRelations creates new insertable relations
func (*MariaDBDriver) QueryMultiDocumentOfProject ¶
func (m *MariaDBDriver) QueryMultiDocumentOfProject(ctx context.Context, param *models.CommonSystemParams) ([]*types.DefaultDocumentStructure, error)
QueryMultiDocumentOfProject retrieves multiple documents from a project
func (*MariaDBDriver) QueryMultiDocumentOfProjectBytes ¶
func (m *MariaDBDriver) QueryMultiDocumentOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)
QueryMultiDocumentOfProjectBytes retrieves multiple documents as bytes
func (*MariaDBDriver) RelationshipDataLoader ¶
func (m *MariaDBDriver) RelationshipDataLoader(ctx context.Context, param *models.CommonSystemParams, ids []string) ([]*types.DefaultDocumentStructure, error)
RelationshipDataLoader loads relationship data
func (*MariaDBDriver) RelationshipDataLoaderBytes ¶
func (m *MariaDBDriver) RelationshipDataLoaderBytes(ctx context.Context, param *models.CommonSystemParams, ids []string) ([][]byte, error)
RelationshipDataLoaderBytes loads relationship data as bytes
func (*MariaDBDriver) RenameField ¶
func (m *MariaDBDriver) RenameField(ctx context.Context, param *models.CommonSystemParams, oldFieldName, newFieldName string) error
RenameField renames a field in all documents in a collection
func (*MariaDBDriver) RenameModel ¶
func (m *MariaDBDriver) RenameModel(ctx context.Context, project *models.Project, modelName, newName string) error
RenameModel renames a model in the project
func (*MariaDBDriver) TransferProject ¶
func (m *MariaDBDriver) TransferProject(ctx context.Context, userId, from, to string) error
TransferProject transfers a project from one user to another
func (*MariaDBDriver) UpdateDocumentOfProject ¶
func (m *MariaDBDriver) UpdateDocumentOfProject(ctx context.Context, param *models.CommonSystemParams, doc *types.DefaultDocumentStructure, replace bool) error
UpdateDocumentOfProject updates a particular document in the project