scylladb

package
v0.0.0-...-c735510 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EventDefinition = &libpersistence.TableDefinition{
	Name:       "event",
	Properties: []libpersistence.Property{},
}

Functions

This section is empty.

Types

type Batch

type Batch struct {
	// contains filtered or unexported fields
}

func (*Batch) AddEntry

func (b *Batch) AddEntry(entry gocql.BatchEntry)

func (*Batch) Execute

func (d *Batch) Execute()

type Client

type Client struct {
	// contains filtered or unexported fields
}

Driver contains all the function needed to be recognized as a libdata driver

func NewClient

func NewClient(info *ClientInfo) (*Client, error)

func (*Client) BeginTransaction

func (d *Client) BeginTransaction(
	wf *libapplication.ApplicationContext, useCache bool,
) error

BeginTransaction will create a new transaction and return it.

func (*Client) CommitTransaction

func (d *Client) CommitTransaction(wk *libapplication.ApplicationContext) error

CommitTransaction will definitely save all the operations in the transaction.

func (*Client) DBExecute

func (d *Client) DBExecute(ctx context.Context, q string, args []interface{}) gocql.Scanner

func (*Client) Delete

Delete will delete the filtered records.

func (*Client) GenerateInsertBuildArgsFunc

func (d *Client) GenerateInsertBuildArgsFunc(datasourceClient libpersistence.DatasourceClient, table libpersistence.TableInterface) string

func (*Client) GenerateScanFunc

func (d *Client) GenerateScanFunc(datasourceClient libpersistence.DatasourceClient, prefix string, table libpersistence.TableInterface) string

func (*Client) GenerateSchema

func (d *Client) GenerateSchema(
	tables []*libpersistence.TableDefinition,
) string

func (*Client) Get

func (d *Client) Get(
	t *libpersistence.TableDefinition,
	wk *libapplication.ApplicationContext, id string,
) (interface{}, error)

Select will return the filtered records.

func (*Client) GetAggregateEvents

func (*Client) GetDriverName

func (d *Client) GetDriverName() string

func (*Client) GetImportRepository

func (d *Client) GetImportRepository() string

func (*Client) GetScanType

func (d *Client) GetScanType() string

func (*Client) GetSession

func (d *Client) GetSession() *gocql.Session

func (*Client) Insert

func (d *Client) Insert(
	t libpersistence.TableInterface, wk *libapplication.ApplicationContext, records []interface{},
	fields []string, args map[string]interface{},
	properties []string,
) (interface{}, error)

func (*Client) MarkDispatchedEvent

func (d *Client) MarkDispatchedEvent(
	wk *libapplication.ApplicationContext,
	event *libapplication.Event,
) error

func (*Client) MigrateTables

func (d *Client) MigrateTables(
	tables map[*libpersistence.TableDefinition]*libpersistence.TableDefinition, mainDatasource bool,
) error

nolint: gocyclo

func (*Client) NewBatch

func (d *Client) NewBatch(limit int) *Batch

func (*Client) RegisterEvents

func (d *Client) RegisterEvents(
	wk *libapplication.ApplicationContext,
	a interface{},
	events []*libapplication.Event) error

RegisterEvent will register the event in the event model.

func (*Client) RollbackTransaction

func (d *Client) RollbackTransaction(wk *libapplication.ApplicationContext) error

RollbackTransaction will cancel all the operations in the transaction.

func (*Client) Select

func (d *Client) Select(
	model libpersistence.TableInterface, wk *libapplication.ApplicationContext,
	filters []*libpersistence.Filter, properties []string, options *libpersistence.OptionsListQuery,
) (interface{}, error)

Select will return the filtered records.

func (*Client) Update

func (d *Client) Update(
	t libpersistence.TableInterface, wk *libapplication.ApplicationContext,
	filters []*libpersistence.Filter, record interface{}, set []string, args map[string]interface{},
	properties []string,
) (interface{}, error)

Update will update the data in the filtered records.

type ClientInfo

type ClientInfo struct {
	Addr     string
	Keyspace string
}

Jump to

Keyboard shortcuts

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