Documentation
¶
Index ¶
- Variables
- func BuildCombinedMetaQuery(keys dataloader.Keys, param *QueryBuilderParam) ([]byte, error)
- func BuildCombinedRelationQuery(relationType string, parentModel string, arg *shared.CommonSystemParams) (*string, *string, error)
- func CommonDocTransformation(model *protobuff.ModelType, local string, result map[string]interface{}, ...) (*shared.DefaultDocumentStructure, error)
- func ConditionBuilder(variable string, args map[string]interface{}, modelType *protobuff.ModelType) (map[string][]string, error)
- func FilterBuilder(variable string, where map[string]interface{}, modelType *protobuff.ModelType) ([]string, error)
- func LimitBuilder(param *graphql.ResolveParams) (int, int)
- func MediaDocTransformation(docType string, result map[string]interface{}) (*protobuff.FileDetails, error)
- func RootConnectionResolverQueryBuilder(param *shared.CommonSystemParams) (string, error)
- func RootResolverMediaQueryBuilder(param *graphql.ResolveParams) (string, error)
- func RootResolverQueryBuilder(param shared.CommonSystemParams, returnCount bool) (*string, error)
- func SelectBuilder(mv string, local string, modelType *protobuff.ModelType, returnCount bool) []string
- type FieldClassification
- type Meta
- type QueryBuilderParam
- type SqlDriver
- func (S *SqlDriver) AddATeamMemberToProject(ctx context.Context, projectId string, memberData map[string]interface{}) error
- func (S *SqlDriver) AddAuthAddOns(ctx context.Context, project *protobuff.Project, auth map[string]interface{}) error
- func (S *SqlDriver) AddCollection(ctx context.Context, projectId string) (*string, error)
- func (S *SqlDriver) AddDocumentToProject(ctx context.Context, projectId string, modelName string, ...) (interface{}, error)
- func (S *SqlDriver) AddFieldToModel(ctx context.Context, param shared.CommonSystemParams, isUpdate bool, ...) (*protobuff.ModelType, error)
- func (S *SqlDriver) AddModel(ctx context.Context, project *protobuff.Project, name string, ...) (*protobuff.ProjectSchema, error)
- func (S *SqlDriver) AddRelationFields(ctx context.Context, from *protobuff.ConnectionType, ...) error
- func (S *SqlDriver) AddTeamMetaInfo(ctx context.Context, docs []*protobuff.SystemUser) ([]*protobuff.SystemUser, error)
- func (S *SqlDriver) CheckCollectionExists(ctx context.Context, projectId string) (bool, error)
- func (S *SqlDriver) CheckDBExists(ctx context.Context, projectId string) (bool, error)
- func (S *SqlDriver) CheckOneToOneRelationExists(ctx context.Context, param *shared.ConnectDisconnectParam) (bool, error)
- func (S *SqlDriver) ConnectBuilder(ctx context.Context, param shared.CommonSystemParams) error
- func (S *SqlDriver) ConvertModel(ctx context.Context, project *protobuff.Project, modelName string) error
- func (S *SqlDriver) CountDocOfProject(ctx context.Context, param *shared.CommonSystemParams) (interface{}, error)
- func (S *SqlDriver) CountDocOfProjectBytes(ctx context.Context, param *shared.CommonSystemParams) ([]byte, error)
- func (S *SqlDriver) CountMedias(ctx context.Context, projectId string, param *graphql.ResolveParams) (int, error)
- func (S *SqlDriver) CountMultiDocumentOfProject(ctx context.Context, param shared.CommonSystemParams, previewMode bool) (int, error)
- func (S *SqlDriver) CreateMediaDocument(ctx context.Context, projectId string, media *protobuff.FileDetails) (*protobuff.FileDetails, error)
- func (S *SqlDriver) CreateRelation(ctx context.Context, projectId string, relation *shared.EdgeRelation) error
- func (S *SqlDriver) DeleteDocumentFromProject(ctx context.Context, param shared.CommonSystemParams) error
- func (S *SqlDriver) DeleteDocumentRelation(ctx context.Context, param shared.CommonSystemParams) error
- func (S *SqlDriver) DeleteDocumentsFromProject(ctx context.Context, param shared.CommonSystemParams) error
- func (S *SqlDriver) DeleteMediaFile(ctx context.Context, param shared.CommonSystemParams) error
- func (S *SqlDriver) DeleteProject(ctx context.Context, projectId string) error
- func (S *SqlDriver) DeleteRelation(ctx context.Context, param *shared.ConnectDisconnectParam, id string) error
- func (S *SqlDriver) DisconnectBuilder(ctx context.Context, param shared.CommonSystemParams) error
- func (S *SqlDriver) DropConnections(ctx context.Context, projectId string, from *protobuff.ConnectionType, ...) error
- func (S *SqlDriver) DropField(ctx context.Context, param shared.CommonSystemParams) error
- func (S *SqlDriver) DuplicateModel(ctx context.Context, project *protobuff.Project, modelName, newName string) (*protobuff.ProjectSchema, error)
- func (S *SqlDriver) GetAllRelationDocumentsOfSingleDocument(ctx context.Context, from string, arg *shared.CommonSystemParams) (interface{}, error)
- func (S *SqlDriver) GetLoggedInProjectUser(ctx context.Context, param *shared.CommonSystemParams) (*shared.DefaultDocumentStructure, error)
- func (S *SqlDriver) GetProjectUser(ctx context.Context, phone, email, projectId string) (*shared.DefaultDocumentStructure, error)
- func (S *SqlDriver) GetProjectUsers(ctx context.Context, projectId string, keys []string) (map[string]*shared.DefaultDocumentStructure, error)
- func (S *SqlDriver) GetRelationIds(ctx context.Context, param *shared.ConnectDisconnectParam) ([]string, error)
- func (S *SqlDriver) GetSingleProjectDocument(ctx context.Context, param shared.CommonSystemParams) (*shared.DefaultDocumentStructure, error)
- func (S *SqlDriver) GetSingleProjectDocumentBytes(ctx context.Context, param shared.CommonSystemParams) ([]byte, error)
- func (S *SqlDriver) GetSingleProjectDocumentRevisions(ctx context.Context, param shared.CommonSystemParams) ([]*shared.DocumentRevisionHistory, error)
- func (S *SqlDriver) GetSingleRawDocumentFromProject(ctx context.Context, param shared.CommonSystemParams) (interface{}, error)
- func (S *SqlDriver) ListMedias(ctx context.Context, projectId string, param *graphql.ResolveParams) ([]*protobuff.FileDetails, error)
- func (S *SqlDriver) NewInsertableRelations(ctx context.Context, param *shared.ConnectDisconnectParam) ([]string, error)
- func (S *SqlDriver) QueryMultiDocumentOfProject(ctx context.Context, param shared.CommonSystemParams) ([]*shared.DefaultDocumentStructure, error)
- func (S *SqlDriver) QueryMultiDocumentOfProjectBytes(ctx context.Context, param shared.CommonSystemParams) ([]byte, error)
- func (S *SqlDriver) RelationshipDataLoader(ctx context.Context, param *shared.CommonSystemParams, ...) (interface{}, error)
- func (S *SqlDriver) RelationshipDataLoaderBytes(ctx context.Context, param *shared.CommonSystemParams, ...) ([]byte, error)
- func (S *SqlDriver) RemoveATeamMemberFromProject(ctx context.Context, projectId string, memberId string) error
- func (S *SqlDriver) RemoveAuthAddOns(ctx context.Context, project *protobuff.Project, option map[string]interface{}) error
- func (S *SqlDriver) RenameField(ctx context.Context, oldFieldName string, repeatedGroupIdentifier *string, ...) error
- func (S *SqlDriver) RenameModel(ctx context.Context, project *protobuff.Project, modelName, newName string) error
- func (S *SqlDriver) RunMigration(ctx context.Context, projectId string) error
- func (S *SqlDriver) TransferProject(ctx context.Context, userId, from, to string) error
- func (S *SqlDriver) UpdateDocumentOfProject(ctx context.Context, param shared.CommonSystemParams, ...) error
Constants ¶
This section is empty.
Variables ¶
View Source
var FilterSuffix = map[string]string{
"eq": "==",
"ne": "!=",
"lt": "<",
"lte": "<=",
"gt": ">",
"gte": ">=",
"in": "IN",
"not_in": "NOT IN",
}
Functions ¶
func BuildCombinedMetaQuery ¶
func BuildCombinedMetaQuery(keys dataloader.Keys, param *QueryBuilderParam) ([]byte, error)
func CommonDocTransformation ¶
func CommonDocTransformation(model *protobuff.ModelType, local string, result map[string]interface{}, classification *FieldClassification) (*shared.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{}) (*protobuff.FileDetails, error)
func RootConnectionResolverQueryBuilder ¶
func RootConnectionResolverQueryBuilder(param *shared.CommonSystemParams) (string, error)
func RootResolverMediaQueryBuilder ¶
func RootResolverMediaQueryBuilder(param *graphql.ResolveParams) (string, error)
func RootResolverQueryBuilder ¶
func RootResolverQueryBuilder(param shared.CommonSystemParams, returnCount bool) (*string, error)
Types ¶
type FieldClassification ¶
type Meta ¶
type Meta struct {
ID string `bun:",pk,type:varchar(36),notnull" json:"id"`
DocID string `bun:",notnull" json:"doc_id"`
CreatedAt time.Time `bun:",notnull,default:current_date" json:"created_at"`
UpdatedAt time.Time `bun:",notnull,default:current_date" json:"updated_at"`
CreatedBy string `bun:",notnull" json:"created_by"`
UpdatedBy string `bun:",notnull" json:"updated_by"`
Status string `bun:",notnull" json:"status"`
}
type QueryBuilderParam ¶
type SqlDriver ¶
type SqlDriver struct {
ORM *bun.DB
DriverCredential *protobuff.DriverCredentials
}
func GetSQLDriver ¶
func GetSQLDriver(driverCredentials *protobuff.DriverCredentials) (*SqlDriver, error)
func (*SqlDriver) AddATeamMemberToProject ¶
func (*SqlDriver) AddAuthAddOns ¶
func (*SqlDriver) AddCollection ¶
func (*SqlDriver) AddDocumentToProject ¶
func (*SqlDriver) AddFieldToModel ¶
func (*SqlDriver) AddRelationFields ¶
func (S *SqlDriver) AddRelationFields(ctx context.Context, from *protobuff.ConnectionType, to *protobuff.ConnectionType) error
func (*SqlDriver) AddTeamMetaInfo ¶
func (S *SqlDriver) AddTeamMetaInfo(ctx context.Context, docs []*protobuff.SystemUser) ([]*protobuff.SystemUser, error)
func (*SqlDriver) CheckCollectionExists ¶
func (*SqlDriver) CheckDBExists ¶
func (*SqlDriver) CheckOneToOneRelationExists ¶
func (*SqlDriver) ConnectBuilder ¶
func (*SqlDriver) ConvertModel ¶
func (*SqlDriver) CountDocOfProject ¶
func (*SqlDriver) CountDocOfProjectBytes ¶
func (*SqlDriver) CountMedias ¶
func (*SqlDriver) CountMultiDocumentOfProject ¶
func (*SqlDriver) CreateMediaDocument ¶
func (S *SqlDriver) CreateMediaDocument(ctx context.Context, projectId string, media *protobuff.FileDetails) (*protobuff.FileDetails, error)
func (*SqlDriver) CreateRelation ¶
func (*SqlDriver) DeleteDocumentFromProject ¶
func (*SqlDriver) DeleteDocumentRelation ¶
func (*SqlDriver) DeleteDocumentsFromProject ¶
func (*SqlDriver) DeleteMediaFile ¶
func (*SqlDriver) DeleteProject ¶
func (*SqlDriver) DeleteRelation ¶
func (*SqlDriver) DisconnectBuilder ¶
func (*SqlDriver) DropConnections ¶
func (S *SqlDriver) DropConnections(ctx context.Context, projectId string, from *protobuff.ConnectionType, to *protobuff.ConnectionType) error
func (*SqlDriver) DuplicateModel ¶
func (*SqlDriver) GetAllRelationDocumentsOfSingleDocument ¶
func (*SqlDriver) GetLoggedInProjectUser ¶
func (S *SqlDriver) GetLoggedInProjectUser(ctx context.Context, param *shared.CommonSystemParams) (*shared.DefaultDocumentStructure, error)
func (*SqlDriver) GetProjectUser ¶
func (*SqlDriver) GetProjectUsers ¶
func (*SqlDriver) GetRelationIds ¶
func (*SqlDriver) GetSingleProjectDocument ¶
func (S *SqlDriver) GetSingleProjectDocument(ctx context.Context, param shared.CommonSystemParams) (*shared.DefaultDocumentStructure, error)
func (*SqlDriver) GetSingleProjectDocumentBytes ¶
func (*SqlDriver) GetSingleProjectDocumentRevisions ¶
func (S *SqlDriver) GetSingleProjectDocumentRevisions(ctx context.Context, param shared.CommonSystemParams) ([]*shared.DocumentRevisionHistory, error)
func (*SqlDriver) GetSingleRawDocumentFromProject ¶
func (*SqlDriver) ListMedias ¶
func (S *SqlDriver) ListMedias(ctx context.Context, projectId string, param *graphql.ResolveParams) ([]*protobuff.FileDetails, error)
func (*SqlDriver) NewInsertableRelations ¶
func (*SqlDriver) QueryMultiDocumentOfProject ¶
func (S *SqlDriver) QueryMultiDocumentOfProject(ctx context.Context, param shared.CommonSystemParams) ([]*shared.DefaultDocumentStructure, error)
func (*SqlDriver) QueryMultiDocumentOfProjectBytes ¶
func (*SqlDriver) RelationshipDataLoader ¶
func (*SqlDriver) RelationshipDataLoaderBytes ¶
func (*SqlDriver) RemoveATeamMemberFromProject ¶
func (*SqlDriver) RemoveAuthAddOns ¶
func (*SqlDriver) RenameField ¶
func (*SqlDriver) RenameModel ¶
func (*SqlDriver) RunMigration ¶
func (*SqlDriver) TransferProject ¶
func (*SqlDriver) UpdateDocumentOfProject ¶
func (S *SqlDriver) UpdateDocumentOfProject(ctx context.Context, param shared.CommonSystemParams, doc *shared.DefaultDocumentStructure, replace bool) error
Click to show internal directories.
Click to hide internal directories.