 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Variables
- func DataClose(data any)
- func DuckDBOperationResult() duckdb.TypeInfo
- func ExtractResponseData(path string, data map[string]any) any
- func GeometryToSQLValue(v any) ([]byte, error)
- func IntervalToSQLValue(v any) (string, error)
- func ParseGeometryValue(v any) (orb.Geometry, error)
- func ParseH3Cell(val any) (any, 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)
- func WarpGraphQLError(err error) gqlerror.List
- type BaseRange
- type CatalogSource
- type CatalogSourceType
- type DataSource
- type DataSourceType
- type Dimensional
- type Int32Range
- type Int64Range
- type Interval
- type OperationResult
- type Querier
- type RangeDetail
- type RangeType
- type Request
- type Response
- type ScalarTypes
- type TimeRange
- type Vector
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
    var ( ErrNoData = errors.New("no data") ErrWrongDataPath = errors.New("wrong data path") )
      View Source
      
  
var GraphQLQueryRules *rules.Rules
    Functions ¶
func DuckDBOperationResult ¶
func DuckDBOperationResult() duckdb.TypeInfo
func ExtractResponseData ¶ added in v0.1.18
func GeometryToSQLValue ¶
func IntervalToSQLValue ¶
func ParseH3Cell ¶ added in v0.1.16
func ParseJsonValue ¶
func ParseScalarArray ¶
func ParseScalarArray[T ScalarTypes](v any) ([]T, error)
func WarpGraphQLError ¶ added in v0.1.9
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"`
	Description string            `json:"description"`
}
    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"`
	AsModule    bool            `json:"as_module"`
	SelfDefined bool            `json:"self_defined"`
	ReadOnly    bool            `json:"read_only"`
	Disabled    bool            `json:"disabled"`
	Sources     []CatalogSource `json:"catalogs"`
}
    type DataSourceType ¶
type DataSourceType string
type Dimensional ¶ added in v0.1.28
type Dimensional interface {
	Len() int
}
    type Int32Range ¶
type Int32Range struct {
	Lower, Upper int32
	Detail       RangeDetail
}
    type Int64Range ¶
type Int64Range struct {
	Lower, Upper int64
	Detail       RangeDetail
}
    type Interval ¶ added in v0.1.9
func (Interval) MarshalJSON ¶ added in v0.1.9
func (*Interval) UnmarshalJSON ¶ added in v0.1.9
type OperationResult ¶
type OperationResult struct {
	Succeed bool   `json:"success"`
	Msg     string `json:"message"`
	Rows    int    `json:"affected_rows"`
	LastId  int    `json:"last_id"`
}
    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 Querier ¶
type Querier interface {
	Query(ctx context.Context, query string, vars map[string]any) (*Response, error)
	RegisterDataSource(ctx context.Context, ds DataSource) error
	LoadDataSource(ctx context.Context, name string) error
	UnloadDataSource(ctx context.Context, name string) error
	DataSourceStatus(ctx context.Context, name string) (string, error)
	DescribeDataSource(ctx context.Context, name string, self bool) (string, error)
}
    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       map[string]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
}
    type Vector ¶ added in v0.1.28
type Vector []float64
func ParseVector ¶ added in v0.1.28
func (Vector) MarshalJSON ¶ added in v0.1.28
func (*Vector) UnmarshalJSON ¶ added in v0.1.28
 Click to show internal directories. 
   Click to hide internal directories.