dynamodb

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DynamoDBDriver

type DynamoDBDriver struct {
	Client           *dynamodb.Client
	TablePrefix      string
	DriverCredential *models.DriverCredentials
}

func GetDynamoDBDriver

func GetDynamoDBDriver(driverCredentials *models.DriverCredentials) (*DynamoDBDriver, error)

GetDynamoDBDriver creates a new DynamoDB project driver instance

func (*DynamoDBDriver) AddCollection

func (d *DynamoDBDriver) AddCollection(ctx context.Context, param *models.CommonSystemParams) error

AddCollection creates metadata for a new collection (model)

func (*DynamoDBDriver) AddDocumentToProject

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

AddDocumentToProject adds a new document to the project

func (*DynamoDBDriver) AddFieldToModel

func (d *DynamoDBDriver) 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 (*DynamoDBDriver) AddModel

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

AddModel adds a new model to the project

func (*DynamoDBDriver) AddRelationFields

func (d *DynamoDBDriver) AddRelationFields(ctx context.Context, param *models.CommonSystemParams, sourceModel, targetModel, relationType string) error

AddRelationFields adds relation fields to a model (no-op for DynamoDB)

func (*DynamoDBDriver) AddTeamMetaInfo

AddTeamMetaInfo adds team meta info to a document

func (*DynamoDBDriver) AggregateDocOfProject

func (d *DynamoDBDriver) AggregateDocOfProject(ctx context.Context, param *models.CommonSystemParams, pipeline interface{}) (interface{}, error)

AggregateDocOfProject performs aggregation on documents

func (*DynamoDBDriver) AggregateDocOfProjectBytes

func (d *DynamoDBDriver) AggregateDocOfProjectBytes(ctx context.Context, param *models.CommonSystemParams, pipeline interface{}) ([]byte, error)

AggregateDocOfProjectBytes performs aggregation on documents (bytes version)

func (*DynamoDBDriver) CheckCollectionExists

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

CheckCollectionExists checks if a collection exists in the project

func (*DynamoDBDriver) CheckOneToOneRelationExists

func (d *DynamoDBDriver) CheckOneToOneRelationExists(ctx context.Context, param *models.CommonSystemParams, fromId, toId, relationName string) (bool, error)

CheckOneToOneRelationExists checks if a one-to-one relation already exists

func (*DynamoDBDriver) ConnectBuilder

func (d *DynamoDBDriver) ConnectBuilder(ctx context.Context, projectId, userId string) error

ConnectBuilder connects a builder to the project

func (*DynamoDBDriver) ConvertModel

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

ConvertModel converts a model in the project

func (*DynamoDBDriver) CountDocOfProject

func (d *DynamoDBDriver) CountDocOfProject(ctx context.Context, param *models.CommonSystemParams) (int, error)

CountDocOfProject counts documents in a project

func (*DynamoDBDriver) CountDocOfProjectBytes

func (d *DynamoDBDriver) CountDocOfProjectBytes(ctx context.Context, param *models.CommonSystemParams) (int, error)

CountDocOfProjectBytes counts documents in a project (bytes version)

func (*DynamoDBDriver) CountMultiDocumentOfProject

func (d *DynamoDBDriver) CountMultiDocumentOfProject(ctx context.Context, param *models.CommonSystemParams, condition map[string]interface{}) (int, error)

CountMultiDocumentOfProject counts multiple documents with filters

func (*DynamoDBDriver) CreateIndex

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

CreateIndex creates an index for a model in the project

func (*DynamoDBDriver) CreateRelation

CreateRelation creates a new relation between documents

func (*DynamoDBDriver) DeleteDocumentFromProject

func (d *DynamoDBDriver) DeleteDocumentFromProject(ctx context.Context, param *models.CommonSystemParams) error

DeleteDocumentFromProject deletes a document from the project

func (*DynamoDBDriver) DeleteDocumentRelation

func (d *DynamoDBDriver) DeleteDocumentRelation(ctx context.Context, param *models.CommonSystemParams) error

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

func (*DynamoDBDriver) DeleteDocumentsFromProject

func (d *DynamoDBDriver) DeleteDocumentsFromProject(ctx context.Context, param *models.CommonSystemParams) error

DeleteDocumentsFromProject deletes multiple documents from the project

func (*DynamoDBDriver) DeleteMediaFile

func (d *DynamoDBDriver) DeleteMediaFile(ctx context.Context, param *models.CommonSystemParams) error

DeleteMediaFile deletes a media file document

func (*DynamoDBDriver) DeleteProject

func (d *DynamoDBDriver) DeleteProject(ctx context.Context, projectID string) error

DeleteProject deletes a project and all related data

func (*DynamoDBDriver) DeleteRelation

func (d *DynamoDBDriver) DeleteRelation(ctx context.Context, param *models.CommonSystemParams, relationID string) error

DeleteRelation deletes a specific relation

func (*DynamoDBDriver) DeleteRelationDocuments

func (d *DynamoDBDriver) DeleteRelationDocuments(ctx context.Context, param *models.CommonSystemParams, relationshipName string) error

DeleteRelationDocuments deletes relation documents for a specific relation

func (*DynamoDBDriver) DisconnectBuilder

func (d *DynamoDBDriver) DisconnectBuilder(ctx context.Context, projectId, userId string) error

DisconnectBuilder disconnects a builder from the project

func (*DynamoDBDriver) DropField

func (d *DynamoDBDriver) DropField(ctx context.Context, param *models.CommonSystemParams, fieldName string) error

DropField drops a field from all documents in a collection

func (*DynamoDBDriver) DropIndex

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

DropIndex drops an index from a model in the project

func (*DynamoDBDriver) DropModel

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

DropModel drops a model from the project

func (*DynamoDBDriver) DuplicateModel

func (d *DynamoDBDriver) DuplicateModel(ctx context.Context, param *models.CommonSystemParams, newModelName string) error

DuplicateModel duplicates a model by copying all its documents

func (*DynamoDBDriver) GetAllRelationDocumentsOfSingleDocument

func (d *DynamoDBDriver) GetAllRelationDocumentsOfSingleDocument(ctx context.Context, param *models.CommonSystemParams, documentID string) ([]*types.DefaultDocumentStructure, error)

GetAllRelationDocumentsOfSingleDocument gets all relation documents for a single document

func (*DynamoDBDriver) GetLoggedInProjectUser

func (d *DynamoDBDriver) GetLoggedInProjectUser(ctx context.Context, projectId, userId string) (*types.DefaultDocumentStructure, error)

GetLoggedInProjectUser gets a logged-in project user by user ID

func (*DynamoDBDriver) GetProjectUser

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

GetProjectUser gets a project user by email or phone

func (*DynamoDBDriver) GetProjectUsers

func (d *DynamoDBDriver) GetProjectUsers(ctx context.Context, projectId string, userIds []string) ([]*types.DefaultDocumentStructure, error)

GetProjectUsers gets project users by their IDs

func (*DynamoDBDriver) GetRelationDocument

GetRelationDocument retrieves a relation document

func (*DynamoDBDriver) GetRelationIds

func (d *DynamoDBDriver) GetRelationIds(ctx context.Context, param *models.CommonSystemParams, documentID, relationName string) ([]string, error)

GetRelationIds gets relation IDs for a document

func (*DynamoDBDriver) GetSingleProjectDocument

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

GetSingleProjectDocument retrieves a single project document by ID

func (*DynamoDBDriver) GetSingleProjectDocumentBytes

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

GetSingleProjectDocumentBytes retrieves a single project document by ID as bytes

func (*DynamoDBDriver) GetSingleProjectDocumentRevisions

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

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

func (*DynamoDBDriver) GetSingleRawDocumentFromProject

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

GetSingleRawDocumentFromProject retrieves a single raw document from the project

func (*DynamoDBDriver) NewInsertableRelations

func (d *DynamoDBDriver) NewInsertableRelations(ctx context.Context, param *models.CommonSystemParams, relations []*types.DefaultDocumentStructure) ([]*types.DefaultDocumentStructure, error)

NewInsertableRelations creates new insertable relations

func (*DynamoDBDriver) QueryMultiDocumentOfProject

func (d *DynamoDBDriver) 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 (*DynamoDBDriver) QueryMultiDocumentOfProjectBytes

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

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

func (*DynamoDBDriver) RelationshipDataLoader

func (d *DynamoDBDriver) RelationshipDataLoader(ctx context.Context, param *models.CommonSystemParams, ids []string) ([]*types.DefaultDocumentStructure, error)

RelationshipDataLoader loads relationship data

func (*DynamoDBDriver) RelationshipDataLoaderBytes

func (d *DynamoDBDriver) RelationshipDataLoaderBytes(ctx context.Context, param *models.CommonSystemParams, ids []string) ([][]byte, error)

RelationshipDataLoaderBytes loads relationship data as bytes

func (*DynamoDBDriver) RenameField

func (d *DynamoDBDriver) RenameField(ctx context.Context, param *models.CommonSystemParams, oldFieldName, newFieldName string) error

RenameField renames a field in all documents in a collection

func (*DynamoDBDriver) RenameModel

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

RenameModel renames a model in the project

func (*DynamoDBDriver) TransferProject

func (d *DynamoDBDriver) TransferProject(ctx context.Context, userId, from, to string) error

TransferProject transfers a project from one user to another

func (*DynamoDBDriver) UpdateDocumentOfProject

func (d *DynamoDBDriver) 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