Documentation
¶
Index ¶
- Constants
- func CollectSubTypesFromType(parentType reflect.Type) (map[string]reflect.Type, error)
- func CreateTableSpecificationFromExample(name string, example any) (*metadata.TableSpecification, error)
- func CreateTypeSpecificationFromExample(typeName string, example any) (*metadata.TypeSpecification, error)
- func CreateTypeSpecificationsFromTableExample(example any) ([]*metadata.TypeSpecification, error)
- func GetScyllaTypeForGoType(t reflect.Type) (string, error)
- func WithAutomaticTableSpecification[T any](name string) tables.ManagerOption
- func WithAutomaticTypeSpecification[T any](name string) tables.ManagerOption
- func WithSimpleView(name string, partitionKeys []string, clusteringKeys []string) tables.ManagerOption
Constants ¶
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 CollectSubTypesFromType ¶
func CreateTableSpecificationFromExample ¶
func CreateTableSpecificationFromExample(name string, example any) (*metadata.TableSpecification, error)
CreateTableSpecificationFromExample creates a table specification object by example from a structure
func CreateTypeSpecificationFromExample ¶
func CreateTypeSpecificationFromExample(typeName string, example any) (*metadata.TypeSpecification, error)
CreateTypeSpecificationFromExample creates a type specification object by example from a structure
func CreateTypeSpecificationsFromTableExample ¶
func CreateTypeSpecificationsFromTableExample(example any) ([]*metadata.TypeSpecification, error)
CreateTypeSpecificationsFromTableExample creates a type specification object by example from a table structure
func GetScyllaTypeForGoType ¶
GetScyllaTypeForGoType 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 WithAutomaticTypeSpecification ¶
func WithAutomaticTypeSpecification[T any](name string) tables.ManagerOption
WithAutomaticTypeSpecification 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.