cmd

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: Apache-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ImagePath     = "tigrisdata/tigris-local"
	ContainerName = "tigris-local-server"
)
View Source
const (
	Read                     = "read"
	Insert                   = "insert"
	Update                   = "update"
	Delete                   = "delete"
	Replace                  = "replace" // alias for insert_or_replace
	InsertOrReplace          = "insert_or_replace"
	CreateOrUpdateCollection = "create_or_update_collection"
	DropCollection           = "drop_collection"
	ListCollections          = "list_collections"
)

Variables

View Source
var (
	ErrBranchNotFound = fmt.Errorf("branch doesn't exist")

	DefaultBranch = "main"
)
View Source
var (
	Append         bool
	NoCreate       bool
	InferenceDepth int32
	PrimaryKey     []string
	AutoGenerate   []string

	CleanUpNULLs = true

	CSVDelimiter        string
	CSVComment          string
	CSVTrimLeadingSpace bool

	CSVNoHeader bool

	ErrCollectionShouldExist = fmt.Errorf("collection should exist to import CSV with no field names")
	ErrNoAppend              = fmt.Errorf(
		"collection exists. use --append if you need to add documents to existing collection")

	ErrNoRecordsExpected = fmt.Errorf("no records expected in the collection after fixing numbers")

	FirstRecord = true
)
View Source
var (
	ErrWrongArgs   = fmt.Errorf("please provide name and description to update or use --rotate to rotate the secret")
	ErrAppNotFound = fmt.Errorf("app key not found")
)
View Source
var ErrSchemaNameMissing = fmt.Errorf("schema name is missing")
View Source
var (
	ErrUnknownExample = fmt.Errorf("unknown example name")
)
View Source
var ErrUnknownOperationType = fmt.Errorf("unknown operation type")
View Source
var (
	ImageTag = "latest"
)

Functions

func Execute

func Execute()

Types

type DescribeCollectionResponse

type DescribeCollectionResponse struct {
	Collection string                  `json:"collection,omitempty"`
	Metadata   *api.CollectionMetadata `json:"metadata,omitempty"`
	Schema     json.RawMessage         `json:"schema,omitempty"`
}

DescribeCollectionResponse adapter to convert Schema field to json.RawMessage.

type DescribeDatabaseResponse

type DescribeDatabaseResponse struct {
	DB          string                        `json:"db,omitempty"`
	Metadata    *api.DatabaseMetadata         `json:"metadata,omitempty"`
	Collections []*DescribeCollectionResponse `json:"collections,omitempty"`
}

DescribeDatabaseResponse adapter to convert schema to json.RawMessage.

type Op

type Op struct {
	Operation  string            `json:"operation"`
	Collection string            `json:"collection"`
	Documents  []json.RawMessage `json:"documents"`
	Filter     json.RawMessage   `json:"filter"`
	Fields     json.RawMessage   `json:"fields"`
	Schema     json.RawMessage   `json:"schema"`
}

type TxOp

type TxOp struct {
	Op                       `json:",inline"`
	Insert                   *Op `json:"insert"`
	Replace                  *Op `json:"replace"`
	InsertOrReplace          *Op `json:"insert_or_replace"`
	Delete                   *Op `json:"delete"`
	Update                   *Op `json:"update"`
	Read                     *Op `json:"read"`
	CreateOrUpdateCollection *Op `json:"create_or_update_collection"`
	DropCollection           *Op `json:"drop_collection"`
	ListCollections          *Op `json:"list_collections"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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