Documentation
¶
Index ¶
- Variables
- func DuckDBOperationResult() duckdb.TypeInfo
- func GeometryToSQLValue(v any) ([]byte, error)
- func IntervalToSQLValue(v any) (string, error)
- func ParseGeometryValue(v any) (orb.Geometry, error)
- func ParseIntervalValue(v any) (time.Duration, error)
- func ParseJsonValue(v any) (map[string]interface{}, error)
- func ParseRangeValue(t RangeType, v any) (any, error)
- func ParseSQLInterval(s string) (time.Duration, error)
- func ParseScalarArray[T ScalarTypes](v any) ([]T, error)
- func ParseTimeValue(v any) (time.Time, error)
- func SQLValueToGeometry(v any) (orb.Geometry, error)
- type BaseRange
- type CatalogSource
- type CatalogSourceType
- type DataSource
- type DataSourceType
- type Int32Range
- type Int64Range
- type OperationResult
- type Querier
- type RangeDetail
- type RangeType
- type Response
- type ScalarTypes
- type TimeRange
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoData = errors.New("no data") ErrWrongDataPath = errors.New("wrong data path") )
Functions ¶
func DuckDBOperationResult ¶
func DuckDBOperationResult() duckdb.TypeInfo
func GeometryToSQLValue ¶
func IntervalToSQLValue ¶
func ParseJsonValue ¶
func ParseScalarArray ¶
func ParseScalarArray[T ScalarTypes](v any) ([]T, error)
Types ¶
type BaseRange ¶
type BaseRange struct { Type RangeType Lower, Upper any Detail RangeDetail }
func (BaseRange) ToInt32Range ¶
func (t BaseRange) ToInt32Range() (Int32Range, error)
func (BaseRange) ToInt64Range ¶
func (t BaseRange) ToInt64Range() (Int64Range, error)
func (BaseRange) ToTimestampRange ¶
type CatalogSource ¶
type CatalogSource struct { Name string `json:"name"` Type CatalogSourceType `json:"type"` Path string `json:"path"` }
type CatalogSourceType ¶
type CatalogSourceType string
type DataSource ¶
type DataSource struct { Name string `json:"name"` Description string `json:"description"` Type DataSourceType `json:"type"` Prefix string `json:"prefix"` Path string `json:"path"` SelfDefined bool `json:"self_defined"` ReadOnly bool `json:"read_only"` Sources []CatalogSource `json:"catalogs"` }
type DataSourceType ¶
type DataSourceType string
type Int32Range ¶
type Int32Range struct {
Lower, Upper int32
Detail RangeDetail
}
type Int64Range ¶
type Int64Range struct {
Lower, Upper int64
Detail RangeDetail
}
type OperationResult ¶
func ErrResult ¶
func ErrResult(err error) *OperationResult
func Result ¶
func Result(msg string, rows, lastId int) *OperationResult
func SQLError ¶
func SQLError(msg string, err error) *OperationResult
func (*OperationResult) CollectSQL ¶
func (r *OperationResult) CollectSQL(res sql.Result)
func (*OperationResult) ToDuckdb ¶
func (r *OperationResult) ToDuckdb() map[string]interface{}
type RangeDetail ¶
type RangeDetail int
const ( RangeEmpty RangeDetail = 1 << iota RangeUpperInfinity RangeLowerInfinity RangeUpperInclusive RangeLowerInclusive )
func ParseRangeDetail ¶
func ParseRangeDetail(v any) (RangeDetail, error)
func (*RangeDetail) Clear ¶
func (t *RangeDetail) Clear()
func (RangeDetail) IsEmpty ¶
func (t RangeDetail) IsEmpty() bool
func (RangeDetail) IsLowerInclusive ¶
func (t RangeDetail) IsLowerInclusive() bool
func (RangeDetail) IsLowerInfinity ¶
func (t RangeDetail) IsLowerInfinity() bool
func (RangeDetail) IsUpperInclusive ¶
func (t RangeDetail) IsUpperInclusive() bool
func (RangeDetail) IsUpperInfinity ¶
func (t RangeDetail) IsUpperInfinity() bool
type Response ¶
type Response struct { Data any `json:"data,omitempty"` Extensions map[string]any `json:"extensions,omitempty"` Errors gqlerror.List `json:"errors,omitempty"` }
func ErrResponse ¶
type ScalarTypes ¶
type TimeRange ¶
type TimeRange struct {
Lower, Upper time.Time
Detail RangeDetail
}
Click to show internal directories.
Click to hide internal directories.