mapping

package
v0.0.0-...-cdb9ebd Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// TagNameCassandra is the tag that indicates a  column in our data
	TagNameCassandra = "cql"

	// TagNameExplicitType indicates a tag that lets us specify a custom CQL type
	// that does not depend on our mapping lookups. This allows users to use types
	// such as UDT's.
	TagNameExplicitType = "cqltype"

	// TagNamePartitioning indicates the tag name to use when identifying partitioning
	// keys within the table. The order of the partition values is the absolute value,
	// with negative numeric values indicating descending sorts.
	TagNamePartitioning = "cqlpartitioning"

	// TagNameSorting indicates the tag name to use when identifying clustering keys
	// within the table. The order of the clustering values is the absolute value, with
	// negative numeric values indicating descending sorts.
	TagNameSorting = "cqlclustering"

	// TagNameIndex indicates to create a named index over the table for a given column.
	// Scylla only supports a singular index.
	TagNameIndex = "cqlindex"
)

Variables

This section is empty.

Functions

func CreateTableSpecificationFromExample

func CreateTableSpecificationFromExample(name string, example any) (*metadata.TableSpecification, error)

CreateTableSpecificationFromExample creates a table specification object by example from a structure

func GetScyllaTypeForType

func GetScyllaTypeForType(t reflect.Type) (string, error)

GetScyllaTypeForType determines the type to use in Scylla

func WithAutomaticTableSpecification

func WithAutomaticTableSpecification[T any](name string) tables.ManagerOption

WithAutomaticTableSpecification creates a table-manager option that sets the table specification by reflecting over the structure.

func WithSimpleView

func WithSimpleView(name string, partitionKeys []string, clusteringKeys []string) tables.ManagerOption

WithSimpleView attaches a view definition to the table manager, based on named columns. All columns of the base table are part of the view

Types

This section is empty.

Jump to

Keyboard shortcuts

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