couchbase

package
v1.1.2 Latest Latest
Warning

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

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

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CouchbaseDriver

type CouchbaseDriver struct {
	Cluster          *gocb.Cluster
	Bucket           *gocb.Bucket
	Collection       *gocb.Collection
	DriverCredential *models.DriverCredentials
}

func GetCouchbaseDriver

func GetCouchbaseDriver(driverCredentials *models.DriverCredentials) (*CouchbaseDriver, error)

GetCouchbaseDriver creates a new Couchbase project driver instance

func (*CouchbaseDriver) AddCollection

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

AddCollection adds a new collection to the project

func (*CouchbaseDriver) AddDocumentToProject

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

AddDocumentToProject adds a new document to the project

func (*CouchbaseDriver) AddFieldToModel

func (c *CouchbaseDriver) AddFieldToModel(ctx context.Context, param *models.CommonSystemParams, isUpdate bool, parent_field string) (*models.ModelType, error)

AddFieldToModel adds a new field to an existing model in the project

func (*CouchbaseDriver) AddModel

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

AddModel adds a new model to the project

func (*CouchbaseDriver) AddRelationFields

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

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

func (*CouchbaseDriver) AddTeamMetaInfo

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

AddTeamMetaInfo adds metadata information for a team in the project

func (*CouchbaseDriver) AggregateDocOfProject

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

AggregateDocOfProject aggregates the documents in the project

func (*CouchbaseDriver) AggregateDocOfProjectBytes

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

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

func (*CouchbaseDriver) CheckCollectionExists

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

CheckCollectionExists checks if a collection exists in the project

func (*CouchbaseDriver) CheckOneToOneRelationExists

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

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

func (*CouchbaseDriver) Close

func (c *CouchbaseDriver) Close()

Close closes the Couchbase connection

func (*CouchbaseDriver) ConnectBuilder

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

ConnectBuilder connects a builder to the project

func (*CouchbaseDriver) ConvertModel

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

ConvertModel converts a model in the project

func (*CouchbaseDriver) CountDocOfProject

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

CountDocOfProject counts the documents in the project

func (*CouchbaseDriver) CountDocOfProjectBytes

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

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

func (*CouchbaseDriver) CountMultiDocumentOfProject

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

CountMultiDocumentOfProject counts multiple documents in the project

func (*CouchbaseDriver) CreateIndex

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

CreateIndex creates an index for a model in the project

func (*CouchbaseDriver) CreateRelation

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

CreateRelation creates a relation in the project

func (*CouchbaseDriver) DeleteDocumentFromProject

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

DeleteDocumentFromProject deletes a document from the project

func (*CouchbaseDriver) DeleteDocumentRelation

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

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

func (*CouchbaseDriver) DeleteDocumentsFromProject

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

DeleteDocumentsFromProject deletes multiple documents from the project

func (*CouchbaseDriver) DeleteProject

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

DeleteProject deletes a project and all related data

func (*CouchbaseDriver) DeleteRelation

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

DeleteRelation deletes a relation in the project

func (*CouchbaseDriver) DeleteRelationDocuments

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

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

DisconnectBuilder disconnects a builder from the project

func (*CouchbaseDriver) DropField

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

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

func (*CouchbaseDriver) DropIndex

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

DropIndex drops an index from a model in the project

func (*CouchbaseDriver) DropModel

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

DropModel drops a model from the project

func (*CouchbaseDriver) GetAllRelationDocumentsOfSingleDocument

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

GetAllRelationDocumentsOfSingleDocument retrieves all relation data of a single document by ID

func (*CouchbaseDriver) GetLoggedInProjectUser

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

GetLoggedInProjectUser retrieves the logged-in user profile for the project

func (*CouchbaseDriver) GetProjectUser

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

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

func (*CouchbaseDriver) GetProjectUsers

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

GetProjectUsers retrieves metadata for multiple users in the project

func (*CouchbaseDriver) GetRelationDocument

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

GetRelationDocument retrieves a relation document by ID

func (*CouchbaseDriver) GetRelationIds

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

GetRelationIds retrieves the IDs of every document related to a document

func (*CouchbaseDriver) GetSingleProjectDocument

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

GetSingleProjectDocument retrieves a single project document by ID

func (*CouchbaseDriver) GetSingleProjectDocumentBytes

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

GetSingleProjectDocumentBytes retrieves a single project document by ID as bytes

func (*CouchbaseDriver) GetSingleProjectDocumentRevisions

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

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

func (*CouchbaseDriver) GetSingleRawDocumentFromProject

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

GetSingleRawDocumentFromProject retrieves a single raw document from the project

func (*CouchbaseDriver) NewInsertableRelations

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

NewInsertableRelations retrieves new insertable relations in the project

func (*CouchbaseDriver) QueryMultiDocumentOfProject

func (c *CouchbaseDriver) 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 (*CouchbaseDriver) QueryMultiDocumentOfProjectBytes

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

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

func (*CouchbaseDriver) RelationshipDataLoader

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

RelationshipDataLoader loads relationship data for the project

func (*CouchbaseDriver) RelationshipDataLoaderBytes

func (c *CouchbaseDriver) 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 (*CouchbaseDriver) RenameField

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

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

RenameModel renames a model in the project

func (*CouchbaseDriver) TransferProject

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

TransferProject transfers a project from one user to another

func (*CouchbaseDriver) UpdateDocumentOfProject

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