gpudb

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2023 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Replicated       ShowTableDistributionType = "Replicated"
	Sharded                                    = "Sharded"
	ShardedRandomly                            = "Random"
	ExternalResource                           = "External Resource"
	LogicalView                                = "Logical View"
)

Variables

View Source
var CharTypes = []ShowTableChar{
	{"char1", 1},
	{"char2", 2},
	{"char4", 4},
	{"char8", 8},
	{"char16", 16},
	{"char32", 32},
	{"char64", 64},
	{"char128", 128},
	{"char256", 256},
}
View Source
var Schemas = AvroSchemas{
	// contains filtered or unexported fields
}

Functions

func ContainsAnyCharType

func ContainsAnyCharType(s *[]string) (bool, int)

func ContainsAnyStr

func ContainsAnyStr(s *[]string, e *[]string) bool

func ContainsStr

func ContainsStr(s *[]string, e string) bool

func ExecuteSqlStructWithOpts

func ExecuteSqlStructWithOpts[T any](
	ctx context.Context, gpudb Gpudb,
	statement string, offset int64, limit int64, options *ExecuteSqlOptions) (T, error)

func GetRecordsStructWithOpts

func GetRecordsStructWithOpts[T any](
	ctx context.Context,
	gpudb Gpudb, table string, offset int64, limit int64, options *GetRecordsOptions) ([]T, error)

GetRecordsStructWithOpts - GetRecords generic variant to work with any avro tagged struct

@param ctx
@param gpudb
@param table
@param offset
@param limit
@param options
@return []T
@return error

Types

type AdminAddHostRequest

type AdminAddHostRequest struct {
	HostAddress string            `avro:"host_address"`
	Options     map[string]string `avro:"options"`
}

AdminAddHostsRequest --------------------------------------------

type AdminAddHostRequestOptions

type AdminAddHostRequestOptions struct {
	DryRun               bool
	AcceptsFailover      bool
	PublicAddress        string
	HostManagerPublicURL string
	RamLimit             uint64
	GPUs                 []int
}

type AdminAddHostResponse

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

type AdminAddRanksRequest

type AdminAddRanksRequest struct {
	Hosts        []string            `avro:"hosts"`
	ConfigParams []map[string]string `avro:"config_params"`
	Options      map[string]string   `avro:"options"`
}

type AdminAddRanksRequestOptions

type AdminAddRanksRequestOptions struct {
	DryRun bool `avro:"dry_run"`
}

AdminAddRanksRequestOptions --------------------------------------------

type AdminAddRanksResponse

type AdminAddRanksResponse struct {
	AddedRanks []string          `avro:"added_ranks"`
	Info       map[string]string `avro:"info"`
}

type AdminBackupBeginRequest

type AdminBackupBeginRequest struct {
	Options map[string]string `avro:"options"`
}

type AdminBackupBeginRequestOptions

type AdminBackupBeginRequestOptions struct{}

AdminBackupBegin --------------------------------------------

type AdminBackupBeginResponse

type AdminBackupBeginResponse struct {
	Info map[string]string `avro:"info"`
}

type AdminBackupEndRequest

type AdminBackupEndRequest struct {
	Options map[string]string `avro:"options"`
}

type AdminBackupEndRequestOptions

type AdminBackupEndRequestOptions struct{}

AdminBackupEnd --------------------------------------------

type AdminBackupEndResponse

type AdminBackupEndResponse struct {
	Info map[string]string `avro:"info"`
}

type AdminRemoveHostRequest

type AdminRemoveHostRequest struct {
	Host    string            `avro:"host"`
	Options map[string]string `avro:"options"`
}

AdminRemoveHostRequest --------------------------------------------

type AdminRemoveHostRequestOptions

type AdminRemoveHostRequestOptions struct {
	DryRun bool
}

type AdminRemoveHostResponse

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

type AdminRemoveRanksRequest

type AdminRemoveRanksRequest struct {
	Ranks   []string          `avro:"ranks"`
	Options map[string]string `avro:"options"`
}

type AdminRemoveRanksRequestOptions

type AdminRemoveRanksRequestOptions struct {
	RebalanceShardedData   bool
	RebalanceUnshardedData bool
	Aggressiveness         int
}

AdminRemoveRanksRequestOptions --------------------------------------------

type AdminRemoveRanksResponse

type AdminRemoveRanksResponse struct {
	RemovedRanks []string          `avro:"removed_ranks"`
	Info         map[string]string `avro:"info"`
}

type AdminShutdownRequest

type AdminShutdownRequest struct {
	ExitType      string            `avro:"exit_type"`
	Authorization string            `avro:"authorization`
	Options       map[string]string `avro:"options"`
}

type AdminShutdownRequestOptions

type AdminShutdownRequestOptions struct {
}

AdminShutdown --------------------------------------------------------

type AdminShutdownResponse

type AdminShutdownResponse struct {
	ExitStatus string            `avro:"exit_status"`
	Info       map[string]string `avro:"info"`
}

type AggregateGroupByOptions

type AggregateGroupByOptions struct {
	Encoding                   string
	FilterExpression           string
	HavingClause               string
	SortOrder                  string
	SortBy                     string
	ResultTable                string
	ResultTablePersist         bool
	ResultTableForceReplicated bool
	ResultTableGeneratePk      bool
	Ttl                        int64
	ChunkSize                  int64
	CreateIndexes              string
	ViewId                     string
	PivotColumn                string
	PivotValues                string
	GroupingSets               string
	Rollup                     string
	Cube                       string
}

AggregateGroupByOptions --------------------------------------------

type AggregateGroupByRequest

type AggregateGroupByRequest struct {
	TableName   string            `avro:"table_name"`
	ColumnNames []string          `avro:"column_names"`
	Offset      int64             `avro:"offset"`
	Limit       int64             `avro:"limit"`
	Encoding    string            `avro:"encoding"`
	Options     map[string]string `avro:"options"`
}

type AggregateGroupByResponse

type AggregateGroupByResponse struct {
	ResponseSchema        string            `avro:"response_schema_str"`
	BinaryEncodedResponse []byte            `avro:"binary_encoded_response"`
	JsonEncodedResponse   string            `avro:"json_encoded_response"`
	TotalNumberOfRecords  int64             `avro:"total_number_of_records"`
	HasMoreRecords        bool              `avro:"has_more_records"`
	PagingTable           string            `avro:"paging_table"`
	Info                  map[string]string `avro:"info"`
}

type AggregateStatisticsOptions

type AggregateStatisticsOptions struct {
	AdditionalColumnNames string
	WeightColumnName      string
}

AggregateStatisticsOptions --------------------------------------------

type AggregateStatisticsRequest

type AggregateStatisticsRequest struct {
	TableName  string `avro:"table_name"`
	ColumnName string `avro:"column_name"`
	// Find supported values for Stats here: https://www.kinetica.com/docs/api/rest/aggregate_statistics_rest.html
	Stats   string            `avro:"stats"`
	Options map[string]string `avro:"options"`
}

type AggregateStatisticsResponse

type AggregateStatisticsResponse struct {
	Stats map[string]float64 `avro:"stats"`
	Info  map[string]string  `avro:"info"`
}

type AlterGraphActionEnum

type AlterGraphActionEnum string

AlterGraphActionEnum - Actions that can be used on AlterGraphRequest

const (
	// AlterGraphActionAddTableMonitor - Add a table monitor to a graph.
	// The table name is specified as the action argument.
	AlterGraphActionAddTableMonitor AlterGraphActionEnum = "add_table_monitor"
	// AlterGraphActionResetClient - The job execution has successfully completed and the response is included in the
	// output parameter job_response or output parameter job_response_str field
	AlterGraphActionResetClient AlterGraphActionEnum = "reset_client"
	// AlterGraphActionResetServer - Reset all current operations on the server side. This is also sent on (re)start.
	AlterGraphActionResetServer AlterGraphActionEnum = "reset_server"
	// AlterGraphActionCancelTask - Cancel a specific task on the graph server.
	AlterGraphActionCancelTask AlterGraphActionEnum = "cancel_task"
	// AlterGraphActionAlterLogger - Change the server side log level; e.g., 'GraphServer.GraphSolver=DEBUG'
	AlterGraphActionAlterLogger AlterGraphActionEnum = "alter_logger"
	// AlterGraphActionDeleteAll - Delete all graphs, and remove any persistence info.
	AlterGraphActionDeleteAll AlterGraphActionEnum = "delete_all"
	// AlterGraphActionStatus - Current status of the graph client (db side).
	AlterGraphActionStatus AlterGraphActionEnum = "status"
	// AlterGraphActionCollectGraphs - Get the create command for all persisted graphs.
	AlterGraphActionCollectGraphs AlterGraphActionEnum = "collect_graphs"
	// AlterGraphActionRestoreGraphs - Re-creates all graphs from persist info on rank0.
	AlterGraphActionRestoreGraphs AlterGraphActionEnum = "restore_graphs"
)

func (AlterGraphActionEnum) String

func (agae AlterGraphActionEnum) String() string

type AlterGraphRequest

type AlterGraphRequest struct {
	// GraphName - Graph on which the operation should be applied.
	// If empty then it will apply to all graphs.
	// This request can be sent from the graph server to the graph client,
	// or from the client to the server depending on the type of operation.
	GraphName string `avro:"graph_name"`
	// Action - Operation to be applied
	Action AlterGraphActionEnum `avro:"action"`
	// ActionArg - Action specific argument.
	ActionArg string            `avro:"action_arg"`
	Options   map[string]string `avro:"options"`
}

type AlterGraphRequestOptions

type AlterGraphRequestOptions struct {
	// ServerId - Indicates which graph server(s) to send the request to.
	// Default is to send to get information about all the servers.
	ServerID string `avro:"server_id"`
	// BypassClientCheck - Set for non-user requests.
	BypassClientCheck bool `avro:"bypass_client_check"`
}

AlterGraphRequestOptions --------------------------------------------

type AlterGraphResponse

type AlterGraphResponse struct {
	// Action - Operation to be applied
	Action AlterGraphActionEnum `avro:"action"`
	// ActionArg - Action specific argument.
	ActionArg string `avro:"action_arg"`
	// Info -
	Info map[string]string `avro:"info"`
}

type AlterUserActionEnum

type AlterUserActionEnum string

AlterUserRequest -------------------------------------------- RequestEncodingEnum - the encoding of the request payload for the job.

const (
	AlterUserActionSetPassword      AlterUserActionEnum = "set_password"
	AlterUserActionSetResourceGroup AlterUserActionEnum = "set_resource_group"
	AlterUserActionSetDefaultSchema AlterUserActionEnum = "set_default_schema"
)

func (AlterUserActionEnum) String

func (auae AlterUserActionEnum) String() string

type AlterUserRequest

type AlterUserRequest struct {
	// Name of the user to be altered. Must be an existing user.
	Name string `avro:"name"`
	// Modification operation to be applied to the user.
	Action AlterUserActionEnum `avro:"action"`
	// The value of the modification, depending on input parameter action.
	Value string `avro:"value"`
	// The value of the modification, depending on input parameter action.
	Options map[string]string `avro:"options"`
}

type AlterUserRequestOptions

type AlterUserRequestOptions struct{}

type AlterUserResponse

type AlterUserResponse struct{}

type AvroSchemas

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

type CreateJobOptions

type CreateJobOptions struct {
	RemoveJobOnComplete string
	JobTag              string
}

CreateJobOptions --------------------------------------------

type CreateJobRequest

type CreateJobRequest struct {
	// Indicates which endpoint to execute, e.g. '/alter/table'.
	Endpoint string `avro:"endpoint"`
	// The encoding of the request payload for the job.
	RequestEncoding RequestEncodingEnum `avro:"request_encoding"`
	// Binary-encoded payload for the job to be run asynchronously.
	// The payload must contain the relevant input parameters for the endpoint indicated in @{input endpoint}.
	// Please see the documentation for the appropriate endpoint to see what values must (or can) be specified.
	// If this parameter is used, then @{input request_encoding} must be {binary}@{choice of input request_encoding}
	// or {snappy}@{choice of input request_encoding}.
	Data []byte `avro:"data"`
	// JSON-encoded payload for the job to be run asynchronously.
	// The payload must contain the relevant input parameters for the endpoint indicated in @{input endpoint}.
	// Please see the documentation for the appropriate endpoint to see what values must (or can) be specified.
	// If this parameter is used, then @{input request_encoding} must be {json}@{choice of input request_encoding}.
	DataStr string            `avro:"data_str"`
	Options map[string]string `avro:"options"`
}

type CreateJobResponse

type CreateJobResponse struct {
	// An identifier for the job created by this call.
	JobID int64 `avro:"job_id"`
	// Additional information.
	Info map[string]string `avro:"info"`
}

type CreateResourceGroupRankingEnum

type CreateResourceGroupRankingEnum string
const (
	CreateResourceGroupRankingFirst  CreateResourceGroupRankingEnum = "first"
	CreateResourceGroupRankingLast   CreateResourceGroupRankingEnum = "last"
	CreateResourceGroupRankingBefore CreateResourceGroupRankingEnum = "before"
	CreateResourceGroupRankingAfter  CreateResourceGroupRankingEnum = "after"
)

func (CreateResourceGroupRankingEnum) String

func (crgre CreateResourceGroupRankingEnum) String() string

type CreateResourceGroupRequest

type CreateResourceGroupRequest struct {
	// Name -Name of the group to be created.
	// Must contain only letters, digits, and underscores, and cannot begin with a digit.
	// Must not match existing resource group name.
	Name string `avro:"name"`
	// TierAttributes - Optional map containing tier names and their respective attribute group limits.
	// The only valid attribute limit that can be set is max_memory (in bytes) for the VRAM & RAM tiers.
	// For instance, to set max VRAM capacity to 1GB and max RAM capacity to 10GB,
	//
	// use: {'VRAM':{'max_memory':'1000000000'}, 'RAM':{'max_memory':'10000000000'}}.
	//
	// The default value is an empty map ( {} ).
	TierAttributes map[string]map[string]string `avro:"tier_attributes"`
	// Ranking - Indicates the relative ranking among existing resource groups where this
	// new resource group will be placed. When using before or after,
	// specify which resource group this one will be inserted before or after in input parameter
	// adjoining_resource_group.
	Ranking CreateResourceGroupRankingEnum `avro:"ranking"`
	// AdjoiningResourceGroup - Indicates the relative ranking among existing resource groups where this
	// new resource group will be placed.
	// When using before or after, specify which resource group this one will be inserted before or after
	// in input parameter adjoining_resource_group. The supported values are:
	//
	// first
	// last
	// before
	// after
	AdjoiningResourceGroup string            `avro:"adjoining_resource_group"`
	Options                map[string]string `avro:"options"`
}

type CreateResourceGroupRequestOptions

type CreateResourceGroupRequestOptions struct {
	// MaxCpuConcurrency - Maximum number of simultaneous threads that will be used to execute a request
	// for this group.
	// The minimum allowed value is 4.
	MaxCpuConcurrency string `avro:"max_cpu_concurrency"`
	// MaxData - Maximum amount of cumulative ram usage regardless of tier status for this group.
	// The minimum allowed value is -1.
	MaxData string `avro:"max_data"`
	// MaxSchedulingPriority - Maximum priority of a scheduled task for this group.
	// The minimum allowed value is 1.
	// The maximum allowed value is 100.
	MaxSchedulingPriority string `avro:"max_scheduling_priority"`
	// MaxTierPriority - Maximum priority of a tiered object for this group.
	// The minimum allowed value is 1.
	// The maximum allowed value is 10.
	MaxTierPriority string `avro:"max_tier_priority"`
}

type CreateResourceGroupResponse

type CreateResourceGroupResponse struct {
	SchemaName string            `avro:"schema_name"`
	Info       map[string]string `avro:"info"`
}

type CreateSchemaRequest

type CreateSchemaRequest struct {
	Name    string            `avro:"schema_name"`
	Options map[string]string `avro:"options"`
}

CreateSchemaRequest --------------------------------------------

type CreateSchemaRequestOptions

type CreateSchemaRequestOptions struct {
	// NoErrorIfExists - If true, prevents an error from occurring if the schema already exists.
	// The default value is false. The supported values are:
	//
	// true
	// false
	NoErrorIfExists bool `avro:"no_error_if_exists"`
}

type CreateSchemaResponse

type CreateSchemaResponse struct {
	SchemaName string            `avro:"schema_name"`
	Info       map[string]string `avro:"info"`
}

type DeleteResourceGroupRequest

type DeleteResourceGroupRequest struct {
	Name    string            `avro:"name"`
	Options map[string]string `avro:"options"`
}

type DeleteResourceGroupRequestOptions

type DeleteResourceGroupRequestOptions struct {
	Cascade bool `avro:"cascade_delete"`
}

type DeleteResourceGroupResponse

type DeleteResourceGroupResponse struct {
	Name string            `avro:"name"`
	Info map[string]string `avro:"info"`
}

type DropSchemaRequest

type DropSchemaRequest struct {
	Name    string            `avro:"schema_name"`
	Options map[string]string `avro:"options"`
}

type DropSchemaRequestOptions

type DropSchemaRequestOptions struct {
	NoErrorIfNotExists bool `avro:"no_error_if_not_exists"`
	Cascade            bool `avro:"cascade"`
}

type DropSchemaResponse

type DropSchemaResponse struct {
	Name string            `avro:"schema_name"`
	Info map[string]string `avro:"info"`
}

type ExecuteSqlMapResult

type ExecuteSqlMapResult struct {
	*ExecuteSqlResponse
	ResultsMap *[]map[string]interface{}
}

type ExecuteSqlOptions

type ExecuteSqlOptions struct {
	Encoding              string
	ParallelExecution     bool
	CostBasedOptimization bool
	PlanCache             bool
	RuleBasedOptimization bool
	ResultsCaching        bool
	PagingTable           string
	PagingTableTtl        int64
	DistributedJoins      bool
	DistributedOperations bool
	SsqOptimization       bool
	LateMaterialization   bool
	Ttl                   int64
	UpdateOnExistingPk    bool
	PreserveDictEncoding  bool
	ValidateChangeColumn  bool
	PrepareMode           bool
}

ExecuteSqlOptions --------------------------------------------

func NewDefaultExecuteSqlOptions

func NewDefaultExecuteSqlOptions() *ExecuteSqlOptions

type ExecuteSqlRequest

type ExecuteSqlRequest struct {
	Statement     string            `avro:"statement"`
	Offset        int64             `avro:"offset"`
	Limit         int64             `avro:"limit"`
	Encoding      string            `avro:"encoding"`
	RequestSchema string            `avro:"request_schema_str"`
	Data          []byte            `avro:"data"`
	Options       map[string]string `avro:"options"`
}

type ExecuteSqlResponse

type ExecuteSqlResponse struct {
	CountAffected         int64             `avro:"count_affected"`
	ResponseSchema        string            `avro:"response_schema_str"`
	BinaryEncodedResponse []byte            `avro:"binary_encoded_response"`
	JsonEncodedResponse   string            `avro:"json_encoded_response"`
	TotalNumberOfRecords  int64             `avro:"total_number_of_records"`
	HasMoreRecords        bool              `avro:"has_more_records"`
	PagingTable           string            `avro:"paging_table"`
	Info                  map[string]string `avro:"info"`
}

type ExecuteSqlStructResult

type ExecuteSqlStructResult struct {
	*ExecuteSqlResponse
	ResultsStruct *[]interface{}
}

type GetJobOptions

type GetJobOptions struct {
	JobTag string
}

GetJobOptions --------------------------------------------

type GetJobRequest

type GetJobRequest struct {
	// An identifier for the job created by this call.
	JobID   int64             `avro:"job_id"`
	Options map[string]string `avro:"options"`
}

type GetJobResponse

type GetJobResponse struct {
	// Indicates which endpoint to execute, e.g. '/alter/table'.
	Endpoint string `avro:"endpoint"`
	// Status of the submitted job
	// RUNNING	    The job is currently executing.
	// DONE	        The job execution has successfully completed and the response is included in the output parameter
	//              job_response or output parameter job_response_str field
	// ERROR	    The job was attempted, but an error was encountered. The output parameter status_map
	//              contains the details of the error in error_message
	// CANCELLED	Job cancellation was requested while the execution was in progress.
	JobStatus JobStatusEnum `avro:"job_status"`
	// True if the end point is still executing.
	Running bool `avro:"running"`
	// Approximate percentage of the job completed.
	Progress int `avro:"progress"`
	// True if the job execution completed and no errors were encountered.
	Successful bool `avro:"successful"`
	// The encoding of the job result (contained in output parameter job_response or output parameter job_response_str.
	ResponseEncoding string `avro:"response_encoding"`
	// The binary-encoded response of the job. This field is populated only when the job has completed and
	// output parameter response_encoding is binary
	JobResponse []byte `avro:"job_response"`
	// The json-encoded response of the job. This field is populated only when the job has completed and
	// output parameter response_encoding is json
	JobResponseStr string `avro:"job_response_str"`
	// Map of various status strings for the executed job.
	StatusMap map[string]string `avro:"status_map"`
	// Additional information.
	Info map[string]string `avro:"info"`
}

type GetRecordsOptions

type GetRecordsOptions struct {
	Expression      string
	FastIndexLookup bool
	SortBy          string
	SortOrder       string
	Encoding        string
}

GetRecordsOptions --------------------------------------------

func NewDefaultGetRecordsOptions

func NewDefaultGetRecordsOptions() *GetRecordsOptions

type GetRecordsRequest

type GetRecordsRequest struct {
	TableName string            `avro:"table_name"`
	Offset    int64             `avro:"offset"`
	Limit     int64             `avro:"limit"`
	Encoding  string            `avro:"encoding"`
	Options   map[string]string `avro:"options"`
}

type GetRecordsResponse

type GetRecordsResponse struct {
	TableName            string            `avro:"table_name"`
	TypeName             string            `avro:"type_name"`
	TypeSchema           string            `avro:"type_schema"`
	RecordsBinary        [][]byte          `avro:"records_binary"`
	RecordsJson          []string          `avro:"records_json"`
	TotalNumberOfRecords int64             `avro:"total_number_of_records"`
	HasMoreRecords       bool              `avro:"has_more_records"`
	Info                 map[string]string `avro:"info"`
}

type Gpudb

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

func New

func New(ctx context.Context, url string) *Gpudb

func NewWithOptions

func NewWithOptions(ctx context.Context, url string, options *GpudbOptions) *Gpudb

func (*Gpudb) ExecuteSqlMap

func (gpudb *Gpudb) ExecuteSqlMap(
	ctx context.Context, sql string, offset int64, limit int64) (*ExecuteSqlMapResult, error)

func (*Gpudb) ExecuteSqlMapWithOpts

func (gpudb *Gpudb) ExecuteSqlMapWithOpts(
	ctx context.Context, statement string, offset int64, limit int64,
	options *ExecuteSqlOptions) (*ExecuteSqlMapResult, error)

func (*Gpudb) ExecuteSqlRaw

func (gpudb *Gpudb) ExecuteSqlRaw(
	ctx context.Context,
	statement string, offset int64, limit int64, requestSchemaStr string,
	data []byte) (*ExecuteSqlResponse, error)

func (*Gpudb) ExecuteSqlRawWithOpts

func (gpudb *Gpudb) ExecuteSqlRawWithOpts(
	ctx context.Context,
	statement string, offset int64, limit int64, requestSchemaStr string,
	data []byte, options *ExecuteSqlOptions) (*ExecuteSqlResponse, error)

func (*Gpudb) ExecuteSqlStruct

func (gpudb *Gpudb) ExecuteSqlStruct(
	ctx context.Context,
	statement string, offset int64, limit int64, newInstance func() interface{}) (*ExecuteSqlStructResult, error)

func (*Gpudb) ExecuteSqlStructWithOpts

func (gpudb *Gpudb) ExecuteSqlStructWithOpts(
	ctx context.Context,
	statement string, offset int64, limit int64, options *ExecuteSqlOptions,
	newInstance func() interface{}) (*ExecuteSqlStructResult, error)

func (*Gpudb) GetOptions

func (gpudb *Gpudb) GetOptions() *GpudbOptions

GetOptions

@receiver gpudb
@return *GpudbOptions

func (*Gpudb) GetRecordsMap

func (gpudb *Gpudb) GetRecordsMap(
	ctx context.Context,
	table string, offset int64, limit int64) (*[]map[string]interface{}, error)

func (*Gpudb) GetRecordsMapWithOpts

func (gpudb *Gpudb) GetRecordsMapWithOpts(
	ctx context.Context,
	table string, offset int64, limit int64, options *GetRecordsOptions) (*[]map[string]interface{}, error)

func (*Gpudb) GetRecordsRaw

func (gpudb *Gpudb) GetRecordsRaw(
	ctx context.Context,
	table string, offset int64, limit int64) (*GetRecordsResponse, error)

func (*Gpudb) GetRecordsRawWithOpts

func (gpudb *Gpudb) GetRecordsRawWithOpts(
	ctx context.Context,
	table string, offset int64, limit int64, options *GetRecordsOptions) (*GetRecordsResponse, error)

func (*Gpudb) GetRecordsStruct

func (gpudb *Gpudb) GetRecordsStruct(
	ctx context.Context,
	table string, offset int64, limit int64, newInstance func() interface{}) (*[]interface{}, error)

func (*Gpudb) GetRecordsStructSendChannel

func (gpudb *Gpudb) GetRecordsStructSendChannel(
	ctx context.Context,
	table string, offset int64, limit int64, resultChannel chan interface{},
	newInstance func() interface{}) (*GetRecordsResponse, error)

func (*Gpudb) GetRecordsStructSendChannelWithOpts

func (gpudb *Gpudb) GetRecordsStructSendChannelWithOpts(
	ctx context.Context, table string, offset int64, limit int64, options *GetRecordsOptions,
	resultChannel chan interface{}, newInstance func() interface{}) (*GetRecordsResponse, error)

func (*Gpudb) GetRecordsStructWithOpts

func (gpudb *Gpudb) GetRecordsStructWithOpts(
	ctx context.Context,
	table string, offset int64, limit int64, options *GetRecordsOptions, newInstance func() interface{}) (*[]interface{}, error)

func (*Gpudb) InsertRecordsMap

func (gpudb *Gpudb) InsertRecordsMap(
	ctx context.Context,
	table string, data []interface{}) (*InsertRecordsResponse, error)

InsertRecordsMap //

@receiver gpudb
@param ctx
@param table
@param data
@return *InsertRecordsResponse
@return error

func (*Gpudb) InsertRecordsMapWithOpts

func (gpudb *Gpudb) InsertRecordsMapWithOpts(
	ctx context.Context,
	table string, data []interface{}, options *InsertRecordsOptions) (*InsertRecordsResponse, error)

InsertRecordsMapWithOpts

@receiver gpudb
@param ctx
@param table
@param data
@param options
@return *InsertRecordsResponse
@return error

func (*Gpudb) InsertRecordsRaw

func (gpudb *Gpudb) InsertRecordsRaw(
	ctx context.Context,
	table string, data []interface{}) (*InsertRecordsResponse, error)

InsertRecordsRaw //

@receiver gpudb
@param ctx
@param table
@param data
@return *InsertRecordsResponse
@return error

func (*Gpudb) InsertRecordsRawWithOpts

func (gpudb *Gpudb) InsertRecordsRawWithOpts(
	ctx context.Context,
	table string, data []interface{}, options *InsertRecordsOptions) (*InsertRecordsResponse, error)

InsertRecordsRawWithOpts //

@receiver gpudb
@param ctx
@param table
@param data
@param options
@return *InsertRecordsResponse
@return error

func (*Gpudb) InsertRecordsStruct

func (gpudb *Gpudb) InsertRecordsStruct(
	ctx context.Context,
	table string, data []interface{}) (*InsertRecordsResponse, error)

InsertRecordsStruct

@receiver gpudb
@param ctx
@param table
@param data
@return *InsertRecordsResponse
@return error

func (*Gpudb) InsertRecordsStructWithOpts

func (gpudb *Gpudb) InsertRecordsStructWithOpts(
	ctx context.Context,
	table string, data []interface{}, options *InsertRecordsOptions) (*InsertRecordsResponse, error)

InsertRecordsStructWithOpts

@receiver gpudb
@param ctx
@param table
@param data
@param options
@return *InsertRecordsResponse
@return error

func (*Gpudb) ShowExplainVerboseAnalyseSqlStatement

func (gpudb *Gpudb) ShowExplainVerboseAnalyseSqlStatement(ctx context.Context, statement string) (*ShowExplainVerboseSqlResult, error)

func (*Gpudb) ShowExplainVerboseSqlStatement

func (gpudb *Gpudb) ShowExplainVerboseSqlStatement(ctx context.Context, statement string) (*ShowExplainVerboseSqlResult, error)

func (*Gpudb) ShowStoredProcedureDDL

func (gpudb *Gpudb) ShowStoredProcedureDDL(ctx context.Context, proc string) (*string, error)

func (*Gpudb) ShowSystemPropertiesRaw

func (gpudb *Gpudb) ShowSystemPropertiesRaw(ctx context.Context) (*ShowSystemPropertiesResponse, error)

func (*Gpudb) ShowSystemPropertiesRawWithOpts

func (gpudb *Gpudb) ShowSystemPropertiesRawWithOpts(
	ctx context.Context, options *ShowSystemPropertiesOptions) (*ShowSystemPropertiesResponse, error)

func (*Gpudb) ShowSystemStatusRaw

func (gpudb *Gpudb) ShowSystemStatusRaw(ctx context.Context) (*ShowSystemStatusResponse, error)

func (*Gpudb) ShowSystemStatusRawWithOpts

func (gpudb *Gpudb) ShowSystemStatusRawWithOpts(
	ctx context.Context, options *ShowSystemStatusOptions) (*ShowSystemStatusResponse, error)

func (*Gpudb) ShowTableDDL

func (gpudb *Gpudb) ShowTableDDL(ctx context.Context, table string) (*string, error)

func (*Gpudb) ShowTableRaw

func (gpudb *Gpudb) ShowTableRaw(ctx context.Context, table string) (*ShowTableResponse, error)

func (*Gpudb) ShowTableRawWithOpts

func (gpudb *Gpudb) ShowTableRawWithOpts(
	ctx context.Context, table string, options *ShowTableOptions) (*ShowTableResponse, error)

func (*Gpudb) ShowTableResourcesBySchema

func (gpudb *Gpudb) ShowTableResourcesBySchema(
	ctx context.Context, schema string, hideTempTables bool) (*ShowTableResourcesBySchema, error)

func (*Gpudb) ShowTableSchemas

func (gpudb *Gpudb) ShowTableSchemas(ctx context.Context) (*[]string, error)

Might be required for 7.0 which does not support /show/schemas

func (*Gpudb) ShowTableSchemasCleaned

func (gpudb *Gpudb) ShowTableSchemasCleaned(ctx context.Context) (*[]string, error)

type GpudbOptions

type GpudbOptions struct {
	Username           string
	Password           string
	UseSnappy          bool
	ByPassSslCertCheck bool
	TraceHTTP          bool
	Timeout            string
}

type InsertRecordsOptions

type InsertRecordsOptions struct {
	UpdateOnExistingPk     bool
	IgnoreExistingPk       bool
	ReturnRecordIDs        bool
	TruncateStrings        bool
	ReturnIndividualErrors bool
	AllowPartialBatch      bool
}

InsertRecords ---------------------------

func NewDefaultInsertRecordsOptions

func NewDefaultInsertRecordsOptions() *InsertRecordsOptions

NewDefaultInsertRecordsOptions

@return *InsertRecordsOptions

type InsertRecordsRequest

type InsertRecordsRequest struct {
	TableName    string            `avro:"table_name"`
	List         [][]byte          `avro:"list"`
	ListString   [][]string        `avro:"list_str"`
	ListEncoding string            `avro:"list_encoding"`
	Options      map[string]string `avro:"options"`
}

type InsertRecordsResponse

type InsertRecordsResponse struct {
	RecordIDs     []string          `avro:"record_ids"`
	CountInserted int               `avro:"count_inserted"`
	CountUpdated  int               `avro:"count_updated"`
	Info          map[string]string `avro:"info"`
}

type JobStatusEnum

type JobStatusEnum string

JobStatusEnum - Status of the submitted job

const (
	// JobStatusRunning -   The job is currently executing.
	JobStatusRunning JobStatusEnum = "RUNNING"
	// JobStatusDone -      The job execution has successfully completed and the response is included in the output
	//                      parameter job_response or output parameter job_response_str field
	JobStatusDone JobStatusEnum = "DONE"
	// JobStatusError -     The job was attempted, but an error was encountered. The output parameter status_map
	//                      contains the details of the error in error_message
	JobStatusError JobStatusEnum = "ERROR"
	// JobStatusCancelled - Job cancellation was requested while the execution was in progress.
	JobStatusCancelled JobStatusEnum = "CANCELLED"
)

func (JobStatusEnum) String

func (jse JobStatusEnum) String() string

type RequestEncodingEnum

type RequestEncodingEnum string

RequestEncodingEnum - the encoding of the request payload for the job.

const (
	RequestEncodingBinary RequestEncodingEnum = "binary"
	RequestEncodingJSON   RequestEncodingEnum = "json"
	RequestEncodingSnappy RequestEncodingEnum = "snappy"
)

func (RequestEncodingEnum) String

func (ree RequestEncodingEnum) String() string

type ShowExplainVerboseSqlPlan

type ShowExplainVerboseSqlPlan struct {
	Id int `json:"ID,string"`
	/*
		{2 @ rank:1, tom:0
		filter-plan-in  |--alias--|-num_chunks-|---count----|-set-name----
		filter-plan-in  | TableAlias_0_ |          1 |                   17 | sys_sql_temp.40375_Aggregate_2_692dc858-7a90-11eb-b9ee-0242ac110002
		filter-plan-in  | TableAlias_1_ |          1 |                   34 | sys_sql_temp.40375_Aggregate_4_692dc8b2-7a90-11eb-ba54-0242ac110002
		filter-plan-step|--i-|----time----|----count----|---in_count--|--out_count--|-J-|-----filter-type-|---set-indices---|---------stencil-types----------|---expression
		filter-plan-step|  0 |   0.002362 |         578 |             |             |   |           start |                 |  B0 B1                         |
		filter-plan-step|  1 |   0.001226 |         122 |         578 |         122 |   |   equi-join:1:1 |  1,0            |  E1 E1                         | (TableAlias_0_.vendor_id == TableAlias_1_.vendor_id)
		filter-plan-out | count-time = 8e-07 |  count =         122 | set-name = filter_planner_view_65
	*/
	AdditionalInfo     string  `json:"ADDITIONAL_INFO"` // this is a large text block
	Columns            string  `json:"COLUMNS"`
	Options            string  `json:"OPTIONS"`
	RunTime            float64 `json:"RUN_TIME,string"`
	TableDefinitions   string  `json:"TABLE_DEFINITIONS"`
	Dependencies       string  `json:"DEPENDENCIES"`
	Endpoint           string  `json:"ENDPOINT"`
	JsonRequest        string  `json:"JSON_REQUEST"`
	LastUseTables      string  `json:"LAST_USE_TABLES"`
	Expressions        string  `json:"EXPRESSIONS"`
	ResultDistribution string  `json:"RESULT_DISTRIBUTION"` // e.g. "NA / replicated" or "shardkey10,shardkey20; / shardkey1,shardkey2;"
	ResultRows         int64   `json:"RESULT_ROWS,string"`
	Parent             *ShowExplainVerboseSqlResult
}

func (*ShowExplainVerboseSqlPlan) FindDependentPlans

func (plan *ShowExplainVerboseSqlPlan) FindDependentPlans() (*[]ShowExplainVerboseSqlPlan, error)

func (*ShowExplainVerboseSqlPlan) JsonRequestMap

func (plan *ShowExplainVerboseSqlPlan) JsonRequestMap() (*map[string]interface{}, error)

type ShowExplainVerboseSqlResult

type ShowExplainVerboseSqlResult struct {
	Plans *[]ShowExplainVerboseSqlPlan `json:"PLAN"`
}

type ShowResourceGroupsOptions

type ShowResourceGroupsOptions struct {
	ShowDefaultValues bool
	ShowDefaultGroup  bool
}

ShowResourceGroupsOptions --------------------------------------------

type ShowResourceGroupsRequest

type ShowResourceGroupsRequest struct {
	Names   []string          `avro:"names"`
	Options map[string]string `avro:"options"`
}

type ShowResourceGroupsResponse

type ShowResourceGroupsResponse struct {
	Groups []map[string]string `avro:"groups"`
	Info   map[string]string   `avro:"info"`
}

type ShowResourceStatisticsOptions

type ShowResourceStatisticsOptions struct {
	TableNames string
}

ShowResourceStatisticsOptions --------------------------------------------

type ShowResourceStatisticsRequest

type ShowResourceStatisticsRequest struct {
	Options map[string]string `avro:"options"`
}

type ShowResourceStatisticsResponse

type ShowResourceStatisticsResponse struct {
	StatisticsMap map[string]string `avro:"statistics_map"`
	Info          map[string]string `avro:"info"`
}

type ShowSchemaOptions

type ShowSchemaOptions struct {
	NoErrorIfNotExists bool
}

ShowSchemaOptions --------------------------------------------

type ShowSchemaRequest

type ShowSchemaRequest struct {
	SchemaName string            `avro:"schema_name"`
	Options    map[string]string `avro:"options"`
}

type ShowSchemaResponse

type ShowSchemaResponse struct {
	SchemaName     string              `avro:"schema_name"`
	SchemaNames    []string            `avro:"schema_names"`
	AdditionalInfo []map[string]string `avro:"additional_info"`
	Info           map[string]string   `avro:"info"`
}

type ShowSecurityOptions

type ShowSecurityOptions struct {
}

ShowSecurityOptions --------------------------------------------

type ShowSecurityRequest

type ShowSecurityRequest struct {
	Names   []string          `avro:"names"`
	Options map[string]string `avro:"options"`
}

type ShowSecurityResponse

type ShowSecurityResponse struct {
	Types          map[string]string              `avro:"types"`
	Roles          map[string][]string            `avro:"roles"`
	Permissions    map[string][]map[string]string `avro:"permissions"`
	ResourceGroups map[string][]string            `avro:"resource_groups"`
	Info           map[string]string              `avro:"info"`
}

type ShowSqlProcOptions

type ShowSqlProcOptions struct {
	NoErrorIfNotExists bool
}

ShowSqlProcOptions --------------------------------------------

type ShowSqlProcRequest

type ShowSqlProcRequest struct {
	ProcedureName string            `avro:"procedure_name"`
	Options       map[string]string `avro:"options"`
}

type ShowSqlProcResponse

type ShowSqlProcResponse struct {
	ProcedureNames       []string            `avro:"procedure_names"`
	ProcedureDefinitions []string            `avro:"procedure_definitions"`
	AdditionalInfo       []map[string]string `avro:"additional_info"`
	Info                 map[string]string   `avro:"info"`
}

type ShowSystemPropertiesOptions

type ShowSystemPropertiesOptions struct {
	Properties string
}

ShowSystemPropertiesOptions --------------------------------------------

func NewDefaultShowSystemPropertiesOptions

func NewDefaultShowSystemPropertiesOptions() *ShowSystemPropertiesOptions

type ShowSystemPropertiesRequest

type ShowSystemPropertiesRequest struct {
	Options map[string]string `avro:"options"`
}

type ShowSystemPropertiesResponse

type ShowSystemPropertiesResponse struct {
	PropertyMap map[string]string `avro:"property_map"`
	Info        map[string]string `avro:"info"`
}

type ShowSystemStatusOptions

type ShowSystemStatusOptions struct {
}

ShowSystemStatusOptions --------------------------------------------

func NewDefaultShowSystemStatusOptions

func NewDefaultShowSystemStatusOptions() *ShowSystemStatusOptions

type ShowSystemStatusRequest

type ShowSystemStatusRequest struct {
	Options map[string]string `avro:"options"`
}

type ShowSystemStatusResponse

type ShowSystemStatusResponse struct {
	StatusMap map[string]string `avro:"status_map"`
	Info      map[string]string `avro:"info"`
}

type ShowSystemTimingOptions

type ShowSystemTimingOptions struct {
}

ShowSystemTimingOptions --------------------------------------------

type ShowSystemTimingRequest

type ShowSystemTimingRequest struct {
	Options map[string]string `avro:"options"`
}

type ShowSystemTimingResponse

type ShowSystemTimingResponse struct {
	Endpoints []string          `avro:"endpoints"`
	TimeInMs  []float32         `avro:"time_in_ms"`
	JobIds    []string          `avro:"jobIds"`
	Info      map[string]string `avro:"info"`
}

type ShowTableAdditionalInfo

type ShowTableAdditionalInfo struct {
	AttributeIndexes         []string // sep by ;
	CollectionNames          string
	GlobalAccessMode         string
	IsDirty                  bool
	RecordBytes              int64
	RefreshMethod            string
	RemainingTableTtl        int64
	StrategyDefinition       string
	PartitionDefinitionsJson string
	RequestAvroJson          string
	RequestAvroType          string
	TableTtl                 int64
	CompressedColumns        map[string]string
	ForeignKeys              string // verify with TPC-DS
	ForeignShardKey          string // verify with TPC-DS
	IsViewPersisted          bool   // seems always be false
	LastRefreshTime          string
	NextRefreshTime          string
	PartitionType            string // NONE, LIST, ...
	IsAutomaticPartition     bool
	PartitionKeys            []string // sep by ,
	SchemaName               string
	TableMonitor             string
	UserChunkSize            int64
	ViewTableName            string
	ColumnMemoryUsageTotal   int64
	ColumnMemoryUsage        map[string]int64
	IndexMemoryUsageTotal    int64
	IndexMemoryUsage         map[string]int64
}

type ShowTableChar

type ShowTableChar struct {
	TypeName string
	Length   int
}

type ShowTableColumn

type ShowTableColumn struct {
	ColumnName     string
	IsChar         bool
	IsString       bool
	DataType       string
	CharLength     int
	ShardKeyFlag   bool
	PrimaryKeyFlag bool
	DictFlag       bool
	DataFlag       bool
	NullableFlag   bool
	StoreOnlyFlag  bool
}

type ShowTableDistributionType

type ShowTableDistributionType string

type ShowTableOptions

type ShowTableOptions struct {
	ForceSynchronous   bool
	GetSizes           bool
	ShowChildren       bool
	NoErrorIfNotExists bool
	GetColumnInfo      bool
}

ShowTableOptions --------------------------------------------

func NewDefaultShowTableOptions

func NewDefaultShowTableOptions() *ShowTableOptions

type ShowTableRequest

type ShowTableRequest struct {
	TableName string            `avro:"table_name"`
	Options   map[string]string `avro:"options"`
}

type ShowTableResource

type ShowTableResource struct {
	Name                    string
	TableType               ShowTableDistributionType
	ResultTable             bool
	TypeId                  string
	TypeSchema              map[string]interface{} // JSON
	TypeLabel               string
	Columns                 []ShowTableColumn
	Size                    int64
	FullSize                int64
	ShowTableAdditionalInfo *ShowTableAdditionalInfo
}

type ShowTableResourcesBySchema

type ShowTableResourcesBySchema struct {
	Tables                     []ShowTableResource
	MaterializedViews          []ShowTableResource
	MaterializedExternalTables []ShowTableResource
	LogicalExternalTable       []ShowTableResource
	LogicalViews               []ShowTableResource
}

type ShowTableResponse

type ShowTableResponse struct {
	TableName         string                `avro:"table_name"`
	TableNames        []string              `avro:"table_names"`
	TableDescriptions [][]string            `avro:"table_descriptions"`
	TypeIds           []string              `avro:"type_ids"`
	TypeSchemas       []string              `avro:"type_schemas"`
	TypeLabels        []string              `avro:"type_labels"`
	Properties        []map[string][]string `avro:"properties"`
	AdditionalInfo    []map[string]string   `avro:"additional_info"`
	Sizes             []int64               `avro:"sizes"`
	FullSizes         []int64               `avro:"full_sizes"`
	JoinSizes         []float64             `avro:"join_sizes"`
	TotalSize         int64                 `avro:"total_size"`
	TotalFullSize     int64                 `avro:"total_full_size"`
	Info              map[string]string     `avro:"info"`
}

Jump to

Keyboard shortcuts

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