cassandra

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 20, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CassandraDriver

type CassandraDriver struct {
	Session          *gocql.Session
	DriverCredential *models.DriverCredentials
}

func GetCassandraDriver

func GetCassandraDriver(driverCredentials *models.DriverCredentials) (*CassandraDriver, error)

GetCassandraDriver creates a new Cassandra project driver instance

func (*CassandraDriver) AddCollection

func (c *CassandraDriver) AddCollection(ctx context.Context, param *models.CommonSystemParams, isRelationCollection bool) error

AddCollection adds a new collection to the project

func (*CassandraDriver) AddDocumentToProject

func (c *CassandraDriver) AddDocumentToProject(ctx context.Context, param *models.CommonSystemParams, doc *types.DefaultDocumentStructure) (interface{}, error)

AddDocumentToProject adds a new document to the project

func (*CassandraDriver) AddFieldToModel

func (c *CassandraDriver) 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 (*CassandraDriver) AddModel

func (c *CassandraDriver) AddModel(ctx context.Context, project *models.Project, model *models.ModelType) (*models.ProjectSchema, error)

AddModel adds a new model to the project

func (*CassandraDriver) AddRelationFields

func (c *CassandraDriver) AddRelationFields(ctx context.Context, from *models.ConnectionType, to *models.ConnectionType) error

AddRelationFields creates a relation field (has one or has many) between models

func (*CassandraDriver) AddTeamMetaInfo

func (c *CassandraDriver) AddTeamMetaInfo(ctx context.Context, docs []*models.SystemUser) ([]*models.SystemUser, error)

AddTeamMetaInfo adds metadata information for a team in the project

func (*CassandraDriver) AggregateDocOfProject

func (c *CassandraDriver) AggregateDocOfProject(ctx context.Context, param *models.CommonSystemParams) (interface{}, error)

AggregateDocOfProject aggregates the documents in the project

func (*CassandraDriver) AggregateDocOfProjectBytes

func (c *CassandraDriver) AggregateDocOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)

AggregateDocOfProjectBytes aggregates the documents in the project and returns the result as bytes

func (*CassandraDriver) CheckCollectionExists

func (c *CassandraDriver) CheckCollectionExists(ctx context.Context, param *models.CommonSystemParams, isRelationCollection bool) (bool, error)

CheckCollectionExists checks if a collection exists in the project

func (*CassandraDriver) CheckOneToOneRelationExists

func (c *CassandraDriver) CheckOneToOneRelationExists(ctx context.Context, param *models.ConnectDisconnectParam) (bool, error)

CheckOneToOneRelationExists checks if a one-to-one relation exists in the project

func (*CassandraDriver) Close

func (c *CassandraDriver) Close()

Close closes the Cassandra session

func (*CassandraDriver) ConnectBuilder

func (c *CassandraDriver) ConnectBuilder(ctx context.Context, param *models.CommonSystemParams) error

ConnectBuilder connects a builder to the project

func (*CassandraDriver) ConvertModel

func (c *CassandraDriver) ConvertModel(ctx context.Context, project *models.Project, modelName string) error

ConvertModel converts a model in the project

func (*CassandraDriver) CountDocOfProject

func (c *CassandraDriver) CountDocOfProject(ctx context.Context, param *models.CommonSystemParams) (interface{}, error)

CountDocOfProject counts the documents in the project

func (*CassandraDriver) CountDocOfProjectBytes

func (c *CassandraDriver) CountDocOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)

CountDocOfProjectBytes counts the documents in the project and returns the result as bytes

func (*CassandraDriver) CountMultiDocumentOfProject

func (c *CassandraDriver) CountMultiDocumentOfProject(ctx context.Context, param *models.CommonSystemParams, previewModel bool) (int, error)

CountMultiDocumentOfProject counts multiple documents in the project

func (*CassandraDriver) CreateIndex

func (c *CassandraDriver) CreateIndex(ctx context.Context, param *models.CommonSystemParams, fieldName string, repeatedGroupIdentifier string) error

CreateIndex creates an index for a model in the project

func (*CassandraDriver) CreateRelation

func (c *CassandraDriver) CreateRelation(ctx context.Context, projectId string, relation *models.EdgeRelation) error

CreateRelation creates a relation in the project

func (*CassandraDriver) DeleteDocumentFromProject

func (c *CassandraDriver) DeleteDocumentFromProject(ctx context.Context, param *models.CommonSystemParams) error

DeleteDocumentFromProject deletes a document from the project

func (*CassandraDriver) DeleteDocumentRelation

func (c *CassandraDriver) DeleteDocumentRelation(ctx context.Context, param *models.CommonSystemParams) error

DeleteDocumentRelation deletes all relations or data in pivot tables from the project

func (*CassandraDriver) DeleteDocumentsFromProject

func (c *CassandraDriver) DeleteDocumentsFromProject(ctx context.Context, param *models.CommonSystemParams) error

DeleteDocumentsFromProject deletes multiple documents from the project

func (*CassandraDriver) DeleteProject

func (c *CassandraDriver) DeleteProject(ctx context.Context, projectID string) error

DeleteProject deletes a project and all related data

func (*CassandraDriver) DeleteRelation

func (c *CassandraDriver) DeleteRelation(ctx context.Context, param *models.ConnectDisconnectParam, id string) error

DeleteRelation deletes a relation in the project

func (*CassandraDriver) DeleteRelationDocuments

func (c *CassandraDriver) DeleteRelationDocuments(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 (*CassandraDriver) DisconnectBuilder

func (c *CassandraDriver) DisconnectBuilder(ctx context.Context, param *models.CommonSystemParams) error

DisconnectBuilder disconnects a builder from the project

func (*CassandraDriver) DropField

func (c *CassandraDriver) DropField(ctx context.Context, param *models.CommonSystemParams) error

DropField drops/deletes a field and its data from the project

func (*CassandraDriver) DropIndex

func (c *CassandraDriver) DropIndex(ctx context.Context, param *models.CommonSystemParams, indexName string) error

DropIndex drops an index from a model in the project

func (*CassandraDriver) DropModel

func (c *CassandraDriver) DropModel(ctx context.Context, project *models.Project, modelName string) error

DropModel drops a model from the project

func (*CassandraDriver) GetAllRelationDocumentsOfSingleDocument

func (c *CassandraDriver) GetAllRelationDocumentsOfSingleDocument(ctx context.Context, from string, arg *models.CommonSystemParams) (interface{}, error)

GetAllRelationDocumentsOfSingleDocument retrieves all relation data of a single document by ID

func (*CassandraDriver) GetLoggedInProjectUser

func (c *CassandraDriver) GetLoggedInProjectUser(ctx context.Context, param *models.CommonSystemParams) (*types.DefaultDocumentStructure, error)

GetLoggedInProjectUser retrieves the logged-in user profile for the project

func (*CassandraDriver) GetProjectUser

func (c *CassandraDriver) GetProjectUser(ctx context.Context, phone, email, projectId string) (*types.DefaultDocumentStructure, error)

GetProjectUser retrieves a user profile by phone, email, and project ID

func (*CassandraDriver) GetProjectUsers

func (c *CassandraDriver) GetProjectUsers(ctx context.Context, projectId string, keys []string) (map[string]*types.DefaultDocumentStructure, error)

GetProjectUsers retrieves metadata for multiple users in the project

func (*CassandraDriver) GetRelationDocument

func (c *CassandraDriver) GetRelationDocument(ctx context.Context, param *models.ConnectDisconnectParam) (*models.EdgeRelation, error)

GetRelationDocument retrieves a relation document by ID

func (*CassandraDriver) GetRelationIds

func (c *CassandraDriver) GetRelationIds(ctx context.Context, param *models.ConnectDisconnectParam) ([]string, error)

GetRelationIds retrieves the IDs of every document related to a document

func (*CassandraDriver) GetSingleProjectDocument

func (c *CassandraDriver) GetSingleProjectDocument(ctx context.Context, param *models.CommonSystemParams) (*types.DefaultDocumentStructure, error)

GetSingleProjectDocument retrieves a single project document by ID

func (*CassandraDriver) GetSingleProjectDocumentBytes

func (c *CassandraDriver) GetSingleProjectDocumentBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)

GetSingleProjectDocumentBytes retrieves a single project document by ID as bytes

func (*CassandraDriver) GetSingleProjectDocumentRevisions

func (c *CassandraDriver) GetSingleProjectDocumentRevisions(ctx context.Context, param *models.CommonSystemParams) ([]*models.DocumentRevisionHistory, error)

GetSingleProjectDocumentRevisions retrieves the revision history of a single project document by ID

func (*CassandraDriver) GetSingleRawDocumentFromProject

func (c *CassandraDriver) GetSingleRawDocumentFromProject(ctx context.Context, param *models.CommonSystemParams) (interface{}, error)

GetSingleRawDocumentFromProject retrieves a single raw document from the project

func (*CassandraDriver) NewInsertableRelations

func (c *CassandraDriver) NewInsertableRelations(ctx context.Context, param *models.ConnectDisconnectParam) ([]string, error)

NewInsertableRelations retrieves new insertable relations in the project

func (*CassandraDriver) QueryMultiDocumentOfProject

func (c *CassandraDriver) QueryMultiDocumentOfProject(ctx context.Context, param *models.CommonSystemParams) ([]*types.DefaultDocumentStructure, error)

QueryMultiDocumentOfProject queries multiple documents in the project and returns the result as a slice of DefaultDocumentStructure

func (*CassandraDriver) QueryMultiDocumentOfProjectBytes

func (c *CassandraDriver) QueryMultiDocumentOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) ([]byte, error)

QueryMultiDocumentOfProjectBytes queries multiple documents in the project and returns the result as bytes

func (*CassandraDriver) RelationshipDataLoader

func (c *CassandraDriver) RelationshipDataLoader(ctx context.Context, param *models.CommonSystemParams, connection map[string]interface{}) (interface{}, error)

RelationshipDataLoader loads relationship data for the project

func (*CassandraDriver) RelationshipDataLoaderBytes

func (c *CassandraDriver) RelationshipDataLoaderBytes(ctx context.Context, param *models.CommonSystemParams, connection map[string]interface{}) ([]byte, error)

RelationshipDataLoaderBytes loads relationship data for the project and returns it as bytes

func (*CassandraDriver) RenameField

func (c *CassandraDriver) 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 (*CassandraDriver) RenameModel

func (c *CassandraDriver) RenameModel(ctx context.Context, project *models.Project, modelName, newName string) error

RenameModel renames a model in the project

func (*CassandraDriver) TransferProject

func (c *CassandraDriver) TransferProject(ctx context.Context, userId, from, to string) error

TransferProject transfers a project from one user to another

func (*CassandraDriver) UpdateDocumentOfProject

func (c *CassandraDriver) UpdateDocumentOfProject(ctx context.Context, param *models.CommonSystemParams, doc *types.DefaultDocumentStructure, replace bool) error

UpdateDocumentOfProject updates a particular document in the project

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL