types

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertType added in v0.1.1

func ConvertType(type_ ColumnType) (gpb.ColumnDataType, error)

func ParseColumnType added in v0.1.1

func ParseColumnType(type_, precision string) (gpb.ColumnDataType, error)

func ParseTimestampPrecision added in v0.1.1

func ParseTimestampPrecision(precision string) gpb.ColumnDataType

Types

type ColumnType

type ColumnType int
const (
	BOOLEAN               ColumnType = 0
	INT8                  ColumnType = 1
	INT16                 ColumnType = 2
	INT32                 ColumnType = 3
	INT64                 ColumnType = 4
	UINT8                 ColumnType = 5
	UINT16                ColumnType = 6
	UINT32                ColumnType = 7
	UINT64                ColumnType = 8
	FLOAT32               ColumnType = 9
	FLOAT64               ColumnType = 10
	BINARY                ColumnType = 11
	STRING                ColumnType = 12
	DATE                  ColumnType = 13
	DATETIME              ColumnType = 14
	TIMESTAMP_SECOND      ColumnType = 15
	TIMESTAMP_MILLISECOND ColumnType = 16
	TIMESTAMP_MICROSECOND ColumnType = 17
	TIMESTAMP_NANOSECOND  ColumnType = 18

	JSON ColumnType = 31

	// the following types are not from protocol buffer
	INT       ColumnType = 101
	UINT      ColumnType = 102
	FLOAT     ColumnType = 103
	TIMESTAMP ColumnType = 104
	BYTES     ColumnType = 105 // eq BINARY
	BOOL      ColumnType = 106 // eq BOOLEAN
)

DO NOT CHANGE THE ORDER OF THESE CONSTANTS THEY WILL KEEP EXACTLY THE SAME ORDER WITH PROTOCOL BUFFER https://github.com/GreptimeTeam/greptime-proto/blob/main/proto/greptime/v1/common.proto#L78-L110

ColumnType has richer types than ColumnDataType in protocol buffer

func (ColumnType) String added in v0.1.1

func (type_ ColumnType) String() string

type Operation added in v0.5.0

type Operation uint

Operation is to identify the operation type of the request. current supported:

  • Insert
  • Delete

TODO: [Update]

const (
	INSERT Operation = iota
	DELETE
)

type TimestampPrecision added in v0.1.1

type TimestampPrecision string
const (
	SECOND      TimestampPrecision = "second"
	MILLISECOND TimestampPrecision = "millisecond"
	MICROSECOND TimestampPrecision = "microsecond"
	NANOSECOND  TimestampPrecision = "nanosecond"
)

func (TimestampPrecision) String added in v0.1.1

func (p TimestampPrecision) String() string

Jump to

Keyboard shortcuts

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