zetasqlite

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2022 License: MIT Imports: 19 Imported by: 5

README

go-zetasqlite

Go GoDoc

A database driver library that interprets ZetaSQL queries and runs them using SQLite3

Features

go-zetasqlite supports database/sql driver interface. So, you can use ZetaSQL queries just by importing github.com/goccy/go-zetasqlite. Also, go-zetasqlite uses SQLite3 as the database engine. Since we are using go-sqlite3, we can use the options ( like :memory: ) supported by go-sqlite3 ( see details ).

Installation

go get github.com/goccy/go-zetasqlite

Synopsis

package main

import (
  "database/sql"
  "fmt"

  _ "github.com/goccy/go-zetasqlite"
)

func main() {
  db, err := sql.Open("zetasqlite", ":memory:")
  if err != nil {
    panic(err)
  }
  defer db.Close()

  rows, err := db.Query(`
  SELECT
  val,
  CASE val
    WHEN 1 THEN 'one'
    WHEN 2 THEN 'two'
    WHEN 3 THEN 'three'
    ELSE 'four'
    END
  FROM UNNEST([1, 2, 3, 4]) AS val`)
  if err != nil {
    panic(err)
  }
  for rows.Next() {
    var (
      num int64
      text string    
    )
    if err := rows.Scan(&num, &text); err != nil {
	  panic(err)
    }
    fmt.Println("num = ", num, "text = ", text)
  }
}

License

MIT

Documentation

Index

Constants

View Source
const (
	ArrayValueHeader  = "zetasqlitearray:"
	StructValueHeader = "zetasqlitestruct:"
)

Variables

This section is empty.

Functions

func SQLiteValue

func SQLiteValue(v interface{}) (interface{}, error)

Types

type AbortBatchStmtNode

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

func (*AbortBatchStmtNode) FormatSQL

func (n *AbortBatchStmtNode) FormatSQL(ctx context.Context) (string, error)

type AddColumnActionNode

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

func (*AddColumnActionNode) FormatSQL

func (n *AddColumnActionNode) FormatSQL(ctx context.Context) (string, error)

type AddConstraintActionNode

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

func (*AddConstraintActionNode) FormatSQL

func (n *AddConstraintActionNode) FormatSQL(ctx context.Context) (string, error)

type AddToRestricteeListActionNode

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

func (*AddToRestricteeListActionNode) FormatSQL

type AggregateFunctionCallNode

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

func (*AggregateFunctionCallNode) FormatSQL

func (n *AggregateFunctionCallNode) FormatSQL(ctx context.Context) (string, error)

type AggregateHavingModifierNode

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

func (*AggregateHavingModifierNode) FormatSQL

type AggregateScanNode

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

func (*AggregateScanNode) FormatSQL

func (n *AggregateScanNode) FormatSQL(ctx context.Context) (string, error)

type AlterAllRowAccessPoliciesStmtNode

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

func (*AlterAllRowAccessPoliciesStmtNode) FormatSQL

type AlterColumnDropDefaultActionNode

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

func (*AlterColumnDropDefaultActionNode) FormatSQL

type AlterColumnDropNotNullActionNode

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

func (*AlterColumnDropNotNullActionNode) FormatSQL

type AlterColumnOptionsActionNode

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

func (*AlterColumnOptionsActionNode) FormatSQL

type AlterColumnSetDataTypeActionNode

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

func (*AlterColumnSetDataTypeActionNode) FormatSQL

type AlterColumnSetDefaultActionNode

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

func (*AlterColumnSetDefaultActionNode) FormatSQL

type AlterDatabaseStmtNode

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

func (*AlterDatabaseStmtNode) FormatSQL

func (n *AlterDatabaseStmtNode) FormatSQL(ctx context.Context) (string, error)

type AlterEntityStmtNode

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

func (*AlterEntityStmtNode) FormatSQL

func (n *AlterEntityStmtNode) FormatSQL(ctx context.Context) (string, error)

type AlterMaterializedViewStmtNode

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

func (*AlterMaterializedViewStmtNode) FormatSQL

type AlterPrivilegeRestrictionStmtNode

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

func (*AlterPrivilegeRestrictionStmtNode) FormatSQL

type AlterRowAccessPolicyStmtNode

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

func (*AlterRowAccessPolicyStmtNode) FormatSQL

type AlterSchemaStmtNode

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

func (*AlterSchemaStmtNode) FormatSQL

func (n *AlterSchemaStmtNode) FormatSQL(ctx context.Context) (string, error)

type AlterTableSetOptionsStmtNode

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

func (*AlterTableSetOptionsStmtNode) FormatSQL

type AlterTableStmtNode

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

func (*AlterTableStmtNode) FormatSQL

func (n *AlterTableStmtNode) FormatSQL(ctx context.Context) (string, error)

type AlterViewStmtNode

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

func (*AlterViewStmtNode) FormatSQL

func (n *AlterViewStmtNode) FormatSQL(ctx context.Context) (string, error)

type AnalyticFunctionCallNode

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

func (*AnalyticFunctionCallNode) FormatSQL

func (n *AnalyticFunctionCallNode) FormatSQL(ctx context.Context) (string, error)

type AnalyticFunctionGroupNode

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

func (*AnalyticFunctionGroupNode) FormatSQL

func (n *AnalyticFunctionGroupNode) FormatSQL(ctx context.Context) (string, error)

type AnalyticScanNode

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

func (*AnalyticScanNode) FormatSQL

func (n *AnalyticScanNode) FormatSQL(ctx context.Context) (string, error)

type AnalyzeStmtNode

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

func (*AnalyzeStmtNode) FormatSQL

func (n *AnalyzeStmtNode) FormatSQL(ctx context.Context) (string, error)

type Analyzer

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

func (*Analyzer) Analyze

func (a *Analyzer) Analyze(ctx context.Context, query string) (*AnalyzerOutput, error)

type AnalyzerOutput

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

type AnonymizedAggregateScanNode

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

func (*AnonymizedAggregateScanNode) FormatSQL

type ArgumentDefNode

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

func (*ArgumentDefNode) FormatSQL

func (n *ArgumentDefNode) FormatSQL(ctx context.Context) (string, error)

type ArgumentListNode

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

func (*ArgumentListNode) FormatSQL

func (n *ArgumentListNode) FormatSQL(ctx context.Context) (string, error)

type ArgumentRefNode

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

func (*ArgumentRefNode) FormatSQL

func (n *ArgumentRefNode) FormatSQL(ctx context.Context) (string, error)

type ArrayScanNode

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

func (*ArrayScanNode) FormatSQL

func (n *ArrayScanNode) FormatSQL(ctx context.Context) (string, error)

type ArrayValue

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

func (*ArrayValue) Add

func (av *ArrayValue) Add(v Value) (Value, error)

func (*ArrayValue) Div

func (av *ArrayValue) Div(v Value) (Value, error)

func (*ArrayValue) EQ

func (av *ArrayValue) EQ(v Value) (bool, error)

func (*ArrayValue) GT

func (av *ArrayValue) GT(v Value) (bool, error)

func (*ArrayValue) GTE

func (av *ArrayValue) GTE(v Value) (bool, error)

func (*ArrayValue) Has

func (av *ArrayValue) Has(v Value) (bool, error)

func (*ArrayValue) LT

func (av *ArrayValue) LT(v Value) (bool, error)

func (*ArrayValue) LTE

func (av *ArrayValue) LTE(v Value) (bool, error)

func (*ArrayValue) Mul

func (av *ArrayValue) Mul(v Value) (Value, error)

func (*ArrayValue) Sub

func (av *ArrayValue) Sub(v Value) (Value, error)

func (*ArrayValue) ToArray

func (av *ArrayValue) ToArray() (*ArrayValue, error)

func (*ArrayValue) ToBool

func (av *ArrayValue) ToBool() (bool, error)

func (*ArrayValue) ToFloat64

func (av *ArrayValue) ToFloat64() (float64, error)

func (*ArrayValue) ToInt64

func (av *ArrayValue) ToInt64() (int64, error)

func (*ArrayValue) ToString

func (av *ArrayValue) ToString() (string, error)

func (*ArrayValue) ToStruct

func (av *ArrayValue) ToStruct() (*StructValue, error)

type AssertRowsModifiedNode

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

func (*AssertRowsModifiedNode) FormatSQL

func (n *AssertRowsModifiedNode) FormatSQL(ctx context.Context) (string, error)

type AssertStmtNode

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

func (*AssertStmtNode) FormatSQL

func (n *AssertStmtNode) FormatSQL(ctx context.Context) (string, error)

type AssignmentStmtNode

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

func (*AssignmentStmtNode) FormatSQL

func (n *AssignmentStmtNode) FormatSQL(ctx context.Context) (string, error)

type AuxLoadDataStmtNode

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

func (*AuxLoadDataStmtNode) FormatSQL

func (n *AuxLoadDataStmtNode) FormatSQL(ctx context.Context) (string, error)

type BeginStmtNode

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

func (*BeginStmtNode) FormatSQL

func (n *BeginStmtNode) FormatSQL(ctx context.Context) (string, error)

type BoolValue

type BoolValue bool

func (BoolValue) Add

func (bv BoolValue) Add(v Value) (Value, error)

func (BoolValue) Div

func (bv BoolValue) Div(v Value) (Value, error)

func (BoolValue) EQ

func (bv BoolValue) EQ(v Value) (bool, error)

func (BoolValue) GT

func (bv BoolValue) GT(v Value) (bool, error)

func (BoolValue) GTE

func (bv BoolValue) GTE(v Value) (bool, error)

func (BoolValue) LT

func (bv BoolValue) LT(v Value) (bool, error)

func (BoolValue) LTE

func (bv BoolValue) LTE(v Value) (bool, error)

func (BoolValue) Mul

func (bv BoolValue) Mul(v Value) (Value, error)

func (BoolValue) Sub

func (bv BoolValue) Sub(v Value) (Value, error)

func (BoolValue) ToArray

func (bv BoolValue) ToArray() (*ArrayValue, error)

func (BoolValue) ToBool

func (bv BoolValue) ToBool() (bool, error)

func (BoolValue) ToFloat64

func (bv BoolValue) ToFloat64() (float64, error)

func (BoolValue) ToInt64

func (bv BoolValue) ToInt64() (int64, error)

func (BoolValue) ToString

func (bv BoolValue) ToString() (string, error)

func (BoolValue) ToStruct

func (bv BoolValue) ToStruct() (*StructValue, error)

type CallStmtNode

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

func (*CallStmtNode) FormatSQL

func (n *CallStmtNode) FormatSQL(ctx context.Context) (string, error)

type CastNode

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

func (*CastNode) FormatSQL

func (n *CastNode) FormatSQL(ctx context.Context) (string, error)

type Catalog

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

func (*Catalog) AddNewFunctionSpec

func (c *Catalog) AddNewFunctionSpec(ctx context.Context, spec *FunctionSpec) error

func (*Catalog) AddNewTableSpec

func (c *Catalog) AddNewTableSpec(ctx context.Context, spec *TableSpec) error

func (*Catalog) Sync

func (c *Catalog) Sync(ctx context.Context) error

type CatalogSpecKind

type CatalogSpecKind string
const (
	TableSpecKind    CatalogSpecKind = "table"
	FunctionSpecKind CatalogSpecKind = "function"
)

type CheckConstraintNode

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

func (*CheckConstraintNode) FormatSQL

func (n *CheckConstraintNode) FormatSQL(ctx context.Context) (string, error)

type CloneDataStmtNode

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

func (*CloneDataStmtNode) FormatSQL

func (n *CloneDataStmtNode) FormatSQL(ctx context.Context) (string, error)

type ColumnAnnotationsNode

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

func (*ColumnAnnotationsNode) FormatSQL

func (n *ColumnAnnotationsNode) FormatSQL(ctx context.Context) (string, error)

type ColumnDefaultValueNode

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

func (*ColumnDefaultValueNode) FormatSQL

func (n *ColumnDefaultValueNode) FormatSQL(ctx context.Context) (string, error)

type ColumnDefinitionNode

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

func (*ColumnDefinitionNode) FormatSQL

func (n *ColumnDefinitionNode) FormatSQL(ctx context.Context) (string, error)

type ColumnHolderNode

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

func (*ColumnHolderNode) FormatSQL

func (n *ColumnHolderNode) FormatSQL(ctx context.Context) (string, error)

type ColumnRefNode

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

func (*ColumnRefNode) FormatSQL

func (n *ColumnRefNode) FormatSQL(ctx context.Context) (string, error)

type ColumnSpec

type ColumnSpec struct {
	Name      string `json:"name"`
	Type      *Type  `json:"type"`
	IsNotNull bool   `json:"isNotNull"`
}

func (*ColumnSpec) SQLiteSchema

func (s *ColumnSpec) SQLiteSchema() string

type CommitStmtNode

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

func (*CommitStmtNode) FormatSQL

func (n *CommitStmtNode) FormatSQL(ctx context.Context) (string, error)

type ComputedColumnNode

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

func (*ComputedColumnNode) FormatSQL

func (n *ComputedColumnNode) FormatSQL(ctx context.Context) (string, error)

type ConnectionNode

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

func (*ConnectionNode) FormatSQL

func (n *ConnectionNode) FormatSQL(ctx context.Context) (string, error)

type ConstantNode

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

func (*ConstantNode) FormatSQL

func (n *ConstantNode) FormatSQL(ctx context.Context) (string, error)

type CreateConstantStmtNode

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

func (*CreateConstantStmtNode) FormatSQL

func (n *CreateConstantStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreateDatabaseStmtNode

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

func (*CreateDatabaseStmtNode) FormatSQL

func (n *CreateDatabaseStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreateEntityStmtNode

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

func (*CreateEntityStmtNode) FormatSQL

func (n *CreateEntityStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreateExternalTableStmtNode

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

func (*CreateExternalTableStmtNode) FormatSQL

type CreateFunctionStmt

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

func (*CreateFunctionStmt) Close

func (s *CreateFunctionStmt) Close() error

func (*CreateFunctionStmt) Exec

func (s *CreateFunctionStmt) Exec(args []driver.Value) (driver.Result, error)

func (*CreateFunctionStmt) NumInput

func (s *CreateFunctionStmt) NumInput() int

func (*CreateFunctionStmt) Query

func (s *CreateFunctionStmt) Query(args []driver.Value) (driver.Rows, error)

type CreateFunctionStmtNode

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

func (*CreateFunctionStmtNode) FormatSQL

func (n *CreateFunctionStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreateIndexStmtNode

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

func (*CreateIndexStmtNode) FormatSQL

func (n *CreateIndexStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreateMaterializedViewStmtNode

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

func (*CreateMaterializedViewStmtNode) FormatSQL

type CreateModelStmtNode

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

func (*CreateModelStmtNode) FormatSQL

func (n *CreateModelStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreatePrivilegeRestrictionStmtNode

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

func (*CreatePrivilegeRestrictionStmtNode) FormatSQL

type CreateProcedureStmtNode

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

func (*CreateProcedureStmtNode) FormatSQL

func (n *CreateProcedureStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreateRowAccessPolicyStmtNode

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

func (*CreateRowAccessPolicyStmtNode) FormatSQL

type CreateSchemaStmtNode

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

func (*CreateSchemaStmtNode) FormatSQL

func (n *CreateSchemaStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreateSnapshotTableStmtNode

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

func (*CreateSnapshotTableStmtNode) FormatSQL

type CreateTableAsSelectStmtNode

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

func (*CreateTableAsSelectStmtNode) FormatSQL

type CreateTableFunctionStmtNode

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

func (*CreateTableFunctionStmtNode) FormatSQL

type CreateTableStmt

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

func (*CreateTableStmt) Close

func (s *CreateTableStmt) Close() error

func (*CreateTableStmt) Exec

func (s *CreateTableStmt) Exec(args []driver.Value) (driver.Result, error)

func (*CreateTableStmt) NumInput

func (s *CreateTableStmt) NumInput() int

func (*CreateTableStmt) Query

func (s *CreateTableStmt) Query(args []driver.Value) (driver.Rows, error)

type CreateTableStmtNode

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

func (*CreateTableStmtNode) FormatSQL

func (n *CreateTableStmtNode) FormatSQL(ctx context.Context) (string, error)

type CreateViewStmtNode

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

func (*CreateViewStmtNode) FormatSQL

func (n *CreateViewStmtNode) FormatSQL(ctx context.Context) (string, error)

type DMLDefaultNode

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

func (*DMLDefaultNode) FormatSQL

func (n *DMLDefaultNode) FormatSQL(ctx context.Context) (string, error)

type DMLStmt

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

func (*DMLStmt) CheckNamedValue

func (s *DMLStmt) CheckNamedValue(value *driver.NamedValue) error

func (*DMLStmt) Close

func (s *DMLStmt) Close() error

func (*DMLStmt) Exec

func (s *DMLStmt) Exec(args []driver.Value) (driver.Result, error)

func (*DMLStmt) ExecContext

func (s *DMLStmt) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)

func (*DMLStmt) NumInput

func (s *DMLStmt) NumInput() int

func (*DMLStmt) Query

func (s *DMLStmt) Query(args []driver.Value) (driver.Rows, error)

func (*DMLStmt) QueryContext

func (s *DMLStmt) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)

type DMLValueNode

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

func (*DMLValueNode) FormatSQL

func (n *DMLValueNode) FormatSQL(ctx context.Context) (string, error)

type DefineTableStmtNode

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

func (*DefineTableStmtNode) FormatSQL

func (n *DefineTableStmtNode) FormatSQL(ctx context.Context) (string, error)

type DeleteStmtNode

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

func (*DeleteStmtNode) FormatSQL

func (n *DeleteStmtNode) FormatSQL(ctx context.Context) (string, error)

type DescribeStmtNode

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

func (*DescribeStmtNode) FormatSQL

func (n *DescribeStmtNode) FormatSQL(ctx context.Context) (string, error)

type DescriptorNode

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

func (*DescriptorNode) FormatSQL

func (n *DescriptorNode) FormatSQL(ctx context.Context) (string, error)

type DropColumnActionNode

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

func (*DropColumnActionNode) FormatSQL

func (n *DropColumnActionNode) FormatSQL(ctx context.Context) (string, error)

type DropConstraintActionNode

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

func (*DropConstraintActionNode) FormatSQL

func (n *DropConstraintActionNode) FormatSQL(ctx context.Context) (string, error)

type DropFunctionStmtNode

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

func (*DropFunctionStmtNode) FormatSQL

func (n *DropFunctionStmtNode) FormatSQL(ctx context.Context) (string, error)

type DropMaterializedViewStmtNode

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

func (*DropMaterializedViewStmtNode) FormatSQL

type DropPrimaryKeyActionNode

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

func (*DropPrimaryKeyActionNode) FormatSQL

func (n *DropPrimaryKeyActionNode) FormatSQL(ctx context.Context) (string, error)

type DropPrivilegeRestrictionStmtNode

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

func (*DropPrivilegeRestrictionStmtNode) FormatSQL

type DropRowAccessPolicyStmtNode

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

func (*DropRowAccessPolicyStmtNode) FormatSQL

type DropSearchIndexStmtNode

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

func (*DropSearchIndexStmtNode) FormatSQL

func (n *DropSearchIndexStmtNode) FormatSQL(ctx context.Context) (string, error)

type DropSnapshotTableStmtNode

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

func (*DropSnapshotTableStmtNode) FormatSQL

func (n *DropSnapshotTableStmtNode) FormatSQL(ctx context.Context) (string, error)

type DropStmtNode

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

func (*DropStmtNode) FormatSQL

func (n *DropStmtNode) FormatSQL(ctx context.Context) (string, error)

type DropTableFunctionStmtNode

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

func (*DropTableFunctionStmtNode) FormatSQL

func (n *DropTableFunctionStmtNode) FormatSQL(ctx context.Context) (string, error)

type ExecuteImmediateArgumentNode

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

func (*ExecuteImmediateArgumentNode) FormatSQL

type ExecuteImmediateStmtNode

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

func (*ExecuteImmediateStmtNode) FormatSQL

func (n *ExecuteImmediateStmtNode) FormatSQL(ctx context.Context) (string, error)

type ExplainStmtNode

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

func (*ExplainStmtNode) FormatSQL

func (n *ExplainStmtNode) FormatSQL(ctx context.Context) (string, error)

type ExportDataStmtNode

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

func (*ExportDataStmtNode) FormatSQL

func (n *ExportDataStmtNode) FormatSQL(ctx context.Context) (string, error)

type ExportModelStmtNode

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

func (*ExportModelStmtNode) FormatSQL

func (n *ExportModelStmtNode) FormatSQL(ctx context.Context) (string, error)

type ExpressionColumnNode

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

func (*ExpressionColumnNode) FormatSQL

func (n *ExpressionColumnNode) FormatSQL(ctx context.Context) (string, error)

type ExtendedCastElementNode

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

func (*ExtendedCastElementNode) FormatSQL

func (n *ExtendedCastElementNode) FormatSQL(ctx context.Context) (string, error)

type ExtendedCastNode

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

func (*ExtendedCastNode) FormatSQL

func (n *ExtendedCastNode) FormatSQL(ctx context.Context) (string, error)

type FilterFieldArgNode

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

func (*FilterFieldArgNode) FormatSQL

func (n *FilterFieldArgNode) FormatSQL(ctx context.Context) (string, error)

type FilterFieldNode

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

func (*FilterFieldNode) FormatSQL

func (n *FilterFieldNode) FormatSQL(ctx context.Context) (string, error)

type FilterScanNode

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

func (*FilterScanNode) FormatSQL

func (n *FilterScanNode) FormatSQL(ctx context.Context) (string, error)

type FilterUsingActionNode

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

func (*FilterUsingActionNode) FormatSQL

func (n *FilterUsingActionNode) FormatSQL(ctx context.Context) (string, error)

type FlattenNode

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

func (*FlattenNode) FormatSQL

func (n *FlattenNode) FormatSQL(ctx context.Context) (string, error)

type FlattenedArgNode

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

func (*FlattenedArgNode) FormatSQL

func (n *FlattenedArgNode) FormatSQL(ctx context.Context) (string, error)

type FloatValue

type FloatValue float64

func (FloatValue) Add

func (fv FloatValue) Add(v Value) (Value, error)

func (FloatValue) Div

func (fv FloatValue) Div(v Value) (Value, error)

func (FloatValue) EQ

func (fv FloatValue) EQ(v Value) (bool, error)

func (FloatValue) GT

func (fv FloatValue) GT(v Value) (bool, error)

func (FloatValue) GTE

func (fv FloatValue) GTE(v Value) (bool, error)

func (FloatValue) LT

func (fv FloatValue) LT(v Value) (bool, error)

func (FloatValue) LTE

func (fv FloatValue) LTE(v Value) (bool, error)

func (FloatValue) Mul

func (fv FloatValue) Mul(v Value) (Value, error)

func (FloatValue) Sub

func (fv FloatValue) Sub(v Value) (Value, error)

func (FloatValue) ToArray

func (fv FloatValue) ToArray() (*ArrayValue, error)

func (FloatValue) ToBool

func (fv FloatValue) ToBool() (bool, error)

func (FloatValue) ToFloat64

func (fv FloatValue) ToFloat64() (float64, error)

func (FloatValue) ToInt64

func (fv FloatValue) ToInt64() (int64, error)

func (FloatValue) ToString

func (fv FloatValue) ToString() (string, error)

func (FloatValue) ToStruct

func (fv FloatValue) ToStruct() (*StructValue, error)

type ForeignKeyNode

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

func (*ForeignKeyNode) FormatSQL

func (n *ForeignKeyNode) FormatSQL(ctx context.Context) (string, error)

type FunctionArgumentNode

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

func (*FunctionArgumentNode) FormatSQL

func (n *FunctionArgumentNode) FormatSQL(ctx context.Context) (string, error)

type FunctionCallNode

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

func (*FunctionCallNode) FormatSQL

func (n *FunctionCallNode) FormatSQL(ctx context.Context) (string, error)

type FunctionSignatureHolderNode

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

func (*FunctionSignatureHolderNode) FormatSQL

type FunctionSpec

type FunctionSpec struct {
	NamePath []string        `json:"name"`
	Language string          `json:"language"`
	Args     []*NameWithType `json:"args"`
	Return   *Type           `json:"return"`
	Body     string          `json:"body"`
	Code     string          `json:"code"`
}

func (*FunctionSpec) FuncName

func (s *FunctionSpec) FuncName() string

func (*FunctionSpec) SQL

func (s *FunctionSpec) SQL() string

type GeneratedColumnInfoNode

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

func (*GeneratedColumnInfoNode) FormatSQL

func (n *GeneratedColumnInfoNode) FormatSQL(ctx context.Context) (string, error)

type GetJsonFieldNode

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

func (*GetJsonFieldNode) FormatSQL

func (n *GetJsonFieldNode) FormatSQL(ctx context.Context) (string, error)

type GetProtoFieldNode

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

func (*GetProtoFieldNode) FormatSQL

func (n *GetProtoFieldNode) FormatSQL(ctx context.Context) (string, error)

type GetStructFieldNode

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

func (*GetStructFieldNode) FormatSQL

func (n *GetStructFieldNode) FormatSQL(ctx context.Context) (string, error)

type GrantStmtNode

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

func (*GrantStmtNode) FormatSQL

func (n *GrantStmtNode) FormatSQL(ctx context.Context) (string, error)

type GrantToActionNode

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

func (*GrantToActionNode) FormatSQL

func (n *GrantToActionNode) FormatSQL(ctx context.Context) (string, error)

type GroupRowsScanNode

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

func (*GroupRowsScanNode) FormatSQL

func (n *GroupRowsScanNode) FormatSQL(ctx context.Context) (string, error)

type GroupingSetNode

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

func (*GroupingSetNode) FormatSQL

func (n *GroupingSetNode) FormatSQL(ctx context.Context) (string, error)

type ImportStmtNode

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

func (*ImportStmtNode) FormatSQL

func (n *ImportStmtNode) FormatSQL(ctx context.Context) (string, error)

type IndexItemNode

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

func (*IndexItemNode) FormatSQL

func (n *IndexItemNode) FormatSQL(ctx context.Context) (string, error)

type InlineLambdaNode

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

func (*InlineLambdaNode) FormatSQL

func (n *InlineLambdaNode) FormatSQL(ctx context.Context) (string, error)

type InsertRowNode

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

func (*InsertRowNode) FormatSQL

func (n *InsertRowNode) FormatSQL(ctx context.Context) (string, error)

type InsertStmtNode

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

func (*InsertStmtNode) FormatSQL

func (n *InsertStmtNode) FormatSQL(ctx context.Context) (string, error)

type IntValue

type IntValue int64

func (IntValue) Add

func (iv IntValue) Add(v Value) (Value, error)

func (IntValue) Div

func (iv IntValue) Div(v Value) (Value, error)

func (IntValue) EQ

func (iv IntValue) EQ(v Value) (bool, error)

func (IntValue) GT

func (iv IntValue) GT(v Value) (bool, error)

func (IntValue) GTE

func (iv IntValue) GTE(v Value) (bool, error)

func (IntValue) LT

func (iv IntValue) LT(v Value) (bool, error)

func (IntValue) LTE

func (iv IntValue) LTE(v Value) (bool, error)

func (IntValue) Mul

func (iv IntValue) Mul(v Value) (Value, error)

func (IntValue) Sub

func (iv IntValue) Sub(v Value) (Value, error)

func (IntValue) ToArray

func (iv IntValue) ToArray() (*ArrayValue, error)

func (IntValue) ToBool

func (iv IntValue) ToBool() (bool, error)

func (IntValue) ToFloat64

func (iv IntValue) ToFloat64() (float64, error)

func (IntValue) ToInt64

func (iv IntValue) ToInt64() (int64, error)

func (IntValue) ToString

func (iv IntValue) ToString() (string, error)

func (IntValue) ToStruct

func (iv IntValue) ToStruct() (*StructValue, error)

type JoinScanNode

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

func (*JoinScanNode) FormatSQL

func (n *JoinScanNode) FormatSQL(ctx context.Context) (string, error)

type LetExprNode

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

func (*LetExprNode) FormatSQL

func (n *LetExprNode) FormatSQL(ctx context.Context) (string, error)

type LimitOffsetScanNode

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

func (*LimitOffsetScanNode) FormatSQL

func (n *LimitOffsetScanNode) FormatSQL(ctx context.Context) (string, error)

type LiteralNode

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

func (*LiteralNode) FormatSQL

func (n *LiteralNode) FormatSQL(ctx context.Context) (string, error)

type MakeProtoFieldNode

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

func (*MakeProtoFieldNode) FormatSQL

func (n *MakeProtoFieldNode) FormatSQL(ctx context.Context) (string, error)

type MakeProtoNode

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

func (*MakeProtoNode) FormatSQL

func (n *MakeProtoNode) FormatSQL(ctx context.Context) (string, error)

type MakeStructNode

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

func (*MakeStructNode) FormatSQL

func (n *MakeStructNode) FormatSQL(ctx context.Context) (string, error)

type MergeStmtNode

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

func (*MergeStmtNode) FormatSQL

func (n *MergeStmtNode) FormatSQL(ctx context.Context) (string, error)

type MergeWhenNode

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

func (*MergeWhenNode) FormatSQL

func (n *MergeWhenNode) FormatSQL(ctx context.Context) (string, error)

type ModelNode

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

func (*ModelNode) FormatSQL

func (n *ModelNode) FormatSQL(ctx context.Context) (string, error)

type ModuleStmtNode

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

func (*ModuleStmtNode) FormatSQL

func (n *ModuleStmtNode) FormatSQL(ctx context.Context) (string, error)

type NameWithType

type NameWithType struct {
	Name string `json:"name"`
	Type *Type  `json:"type"`
}

type Node

type Node interface {
	FormatSQL(context.Context) (string, error)
}

type ObjectUnitNode

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

func (*ObjectUnitNode) FormatSQL

func (n *ObjectUnitNode) FormatSQL(ctx context.Context) (string, error)

type OptionNode

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

func (*OptionNode) FormatSQL

func (n *OptionNode) FormatSQL(ctx context.Context) (string, error)

type OrderByItemNode

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

func (*OrderByItemNode) FormatSQL

func (n *OrderByItemNode) FormatSQL(ctx context.Context) (string, error)

type OrderByScanNode

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

func (*OrderByScanNode) FormatSQL

func (n *OrderByScanNode) FormatSQL(ctx context.Context) (string, error)

type OutputColumnNode

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

func (*OutputColumnNode) FormatSQL

func (n *OutputColumnNode) FormatSQL(ctx context.Context) (string, error)

type ParameterNode

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

func (*ParameterNode) FormatSQL

func (n *ParameterNode) FormatSQL(ctx context.Context) (string, error)

type PivotColumnNode

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

func (*PivotColumnNode) FormatSQL

func (n *PivotColumnNode) FormatSQL(ctx context.Context) (string, error)

type PivotScanNode

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

func (*PivotScanNode) FormatSQL

func (n *PivotScanNode) FormatSQL(ctx context.Context) (string, error)

type PrimaryKeyNode

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

func (*PrimaryKeyNode) FormatSQL

func (n *PrimaryKeyNode) FormatSQL(ctx context.Context) (string, error)

type PrivilegeNode

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

func (*PrivilegeNode) FormatSQL

func (n *PrivilegeNode) FormatSQL(ctx context.Context) (string, error)

type ProjectScanNode

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

func (*ProjectScanNode) FormatSQL

func (n *ProjectScanNode) FormatSQL(ctx context.Context) (string, error)

type QueryStmt

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

func (*QueryStmt) CheckNamedValue

func (s *QueryStmt) CheckNamedValue(value *driver.NamedValue) error

func (*QueryStmt) Close

func (s *QueryStmt) Close() error

func (*QueryStmt) Exec

func (s *QueryStmt) Exec(args []driver.Value) (driver.Result, error)

func (*QueryStmt) ExecContext

func (s *QueryStmt) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)

func (*QueryStmt) NumInput

func (s *QueryStmt) NumInput() int

func (*QueryStmt) OutputColumns

func (s *QueryStmt) OutputColumns() []*ColumnSpec

func (*QueryStmt) Query

func (s *QueryStmt) Query(args []driver.Value) (driver.Rows, error)

func (*QueryStmt) QueryContext

func (s *QueryStmt) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)

type QueryStmtNode

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

func (*QueryStmtNode) FormatSQL

func (n *QueryStmtNode) FormatSQL(ctx context.Context) (string, error)

type RecursiveRefScanNode

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

func (*RecursiveRefScanNode) FormatSQL

func (n *RecursiveRefScanNode) FormatSQL(ctx context.Context) (string, error)

type RecursiveScanNode

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

func (*RecursiveScanNode) FormatSQL

func (n *RecursiveScanNode) FormatSQL(ctx context.Context) (string, error)

type RelationArgumentScanNode

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

func (*RelationArgumentScanNode) FormatSQL

func (n *RelationArgumentScanNode) FormatSQL(ctx context.Context) (string, error)

type RemoveFromRestricteeListActionNode

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

func (*RemoveFromRestricteeListActionNode) FormatSQL

type RenameColumnActionNode

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

func (*RenameColumnActionNode) FormatSQL

func (n *RenameColumnActionNode) FormatSQL(ctx context.Context) (string, error)

type RenameStmtNode

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

func (*RenameStmtNode) FormatSQL

func (n *RenameStmtNode) FormatSQL(ctx context.Context) (string, error)

type RenameToActionNode

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

func (*RenameToActionNode) FormatSQL

func (n *RenameToActionNode) FormatSQL(ctx context.Context) (string, error)

type ReplaceFieldItemNode

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

func (*ReplaceFieldItemNode) FormatSQL

func (n *ReplaceFieldItemNode) FormatSQL(ctx context.Context) (string, error)

type ReplaceFieldNode

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

func (*ReplaceFieldNode) FormatSQL

func (n *ReplaceFieldNode) FormatSQL(ctx context.Context) (string, error)

type RestrictToActionNode

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

func (*RestrictToActionNode) FormatSQL

func (n *RestrictToActionNode) FormatSQL(ctx context.Context) (string, error)

type ReturningClauseNode

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

func (*ReturningClauseNode) FormatSQL

func (n *ReturningClauseNode) FormatSQL(ctx context.Context) (string, error)

type RevokeFromActionNode

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

func (*RevokeFromActionNode) FormatSQL

func (n *RevokeFromActionNode) FormatSQL(ctx context.Context) (string, error)

type RevokeStmtNode

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

func (*RevokeStmtNode) FormatSQL

func (n *RevokeStmtNode) FormatSQL(ctx context.Context) (string, error)

type RollbackStmtNode

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

func (*RollbackStmtNode) FormatSQL

func (n *RollbackStmtNode) FormatSQL(ctx context.Context) (string, error)

type Rows

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

func (*Rows) Close

func (r *Rows) Close() error

func (*Rows) ColumnTypeDatabaseTypeName added in v0.2.0

func (r *Rows) ColumnTypeDatabaseTypeName(i int) string

func (*Rows) Columns

func (r *Rows) Columns() []string

func (*Rows) Next

func (r *Rows) Next(dest []driver.Value) error

type RunBatchStmtNode

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

func (*RunBatchStmtNode) FormatSQL

func (n *RunBatchStmtNode) FormatSQL(ctx context.Context) (string, error)

type SampleScanNode

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

func (*SampleScanNode) FormatSQL

func (n *SampleScanNode) FormatSQL(ctx context.Context) (string, error)

type SetAsActionNode

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

func (*SetAsActionNode) FormatSQL

func (n *SetAsActionNode) FormatSQL(ctx context.Context) (string, error)

type SetCollateClauseNode

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

func (*SetCollateClauseNode) FormatSQL

func (n *SetCollateClauseNode) FormatSQL(ctx context.Context) (string, error)

type SetOperationItemNode

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

func (*SetOperationItemNode) FormatSQL

func (n *SetOperationItemNode) FormatSQL(ctx context.Context) (string, error)

type SetOperationScanNode

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

func (*SetOperationScanNode) FormatSQL

func (n *SetOperationScanNode) FormatSQL(ctx context.Context) (string, error)

type SetOptionsActionNode

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

func (*SetOptionsActionNode) FormatSQL

func (n *SetOptionsActionNode) FormatSQL(ctx context.Context) (string, error)

type SetTransactionStmtNode

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

func (*SetTransactionStmtNode) FormatSQL

func (n *SetTransactionStmtNode) FormatSQL(ctx context.Context) (string, error)

type ShowStmtNode

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

func (*ShowStmtNode) FormatSQL

func (n *ShowStmtNode) FormatSQL(ctx context.Context) (string, error)

type SingleRowScanNode

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

func (*SingleRowScanNode) FormatSQL

func (n *SingleRowScanNode) FormatSQL(ctx context.Context) (string, error)

type StartBatchStmtNode

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

func (*StartBatchStmtNode) FormatSQL

func (n *StartBatchStmtNode) FormatSQL(ctx context.Context) (string, error)

type StringValue

type StringValue string

func (StringValue) Add

func (sv StringValue) Add(v Value) (Value, error)

func (StringValue) Div

func (sv StringValue) Div(v Value) (Value, error)

func (StringValue) EQ

func (sv StringValue) EQ(v Value) (bool, error)

func (StringValue) GT

func (sv StringValue) GT(v Value) (bool, error)

func (StringValue) GTE

func (sv StringValue) GTE(v Value) (bool, error)

func (StringValue) LT

func (sv StringValue) LT(v Value) (bool, error)

func (StringValue) LTE

func (sv StringValue) LTE(v Value) (bool, error)

func (StringValue) Mul

func (sv StringValue) Mul(v Value) (Value, error)

func (StringValue) Sub

func (sv StringValue) Sub(v Value) (Value, error)

func (StringValue) ToArray

func (sv StringValue) ToArray() (*ArrayValue, error)

func (StringValue) ToBool

func (sv StringValue) ToBool() (bool, error)

func (StringValue) ToFloat64

func (sv StringValue) ToFloat64() (float64, error)

func (StringValue) ToInt64

func (sv StringValue) ToInt64() (int64, error)

func (StringValue) ToString

func (sv StringValue) ToString() (string, error)

func (StringValue) ToStruct

func (sv StringValue) ToStruct() (*StructValue, error)

type StructValue

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

func (*StructValue) Add

func (sv *StructValue) Add(v Value) (Value, error)

func (*StructValue) Div

func (sv *StructValue) Div(v Value) (Value, error)

func (*StructValue) EQ

func (sv *StructValue) EQ(v Value) (bool, error)

func (*StructValue) GT

func (sv *StructValue) GT(v Value) (bool, error)

func (*StructValue) GTE

func (sv *StructValue) GTE(v Value) (bool, error)

func (*StructValue) LT

func (sv *StructValue) LT(v Value) (bool, error)

func (*StructValue) LTE

func (sv *StructValue) LTE(v Value) (bool, error)

func (*StructValue) Mul

func (sv *StructValue) Mul(v Value) (Value, error)

func (*StructValue) Sub

func (sv *StructValue) Sub(v Value) (Value, error)

func (*StructValue) ToArray

func (sv *StructValue) ToArray() (*ArrayValue, error)

func (*StructValue) ToBool

func (sv *StructValue) ToBool() (bool, error)

func (*StructValue) ToFloat64

func (sv *StructValue) ToFloat64() (float64, error)

func (*StructValue) ToInt64

func (sv *StructValue) ToInt64() (int64, error)

func (*StructValue) ToString

func (sv *StructValue) ToString() (string, error)

func (*StructValue) ToStruct

func (sv *StructValue) ToStruct() (*StructValue, error)

type SubqueryExprNode

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

func (*SubqueryExprNode) FormatSQL

func (n *SubqueryExprNode) FormatSQL(ctx context.Context) (string, error)

type SystemVariableNode

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

func (*SystemVariableNode) FormatSQL

func (n *SystemVariableNode) FormatSQL(ctx context.Context) (string, error)

type TVFScanNode

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

func (*TVFScanNode) FormatSQL

func (n *TVFScanNode) FormatSQL(ctx context.Context) (string, error)

type TableAndColumnInfoNode

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

func (*TableAndColumnInfoNode) FormatSQL

func (n *TableAndColumnInfoNode) FormatSQL(ctx context.Context) (string, error)

type TableScanNode

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

func (*TableScanNode) FormatSQL

func (n *TableScanNode) FormatSQL(ctx context.Context) (string, error)

type TableSpec

type TableSpec struct {
	NamePath   []string       `json:"namePath"`
	Columns    []*ColumnSpec  `json:"columns"`
	CreateMode ast.CreateMode `json:"createMode"`
}

func (*TableSpec) Column

func (s *TableSpec) Column(name string) *ColumnSpec

func (*TableSpec) SQLiteSchema

func (s *TableSpec) SQLiteSchema() string

func (*TableSpec) TableName

func (s *TableSpec) TableName() string

type TruncateStmtNode

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

func (*TruncateStmtNode) FormatSQL

func (n *TruncateStmtNode) FormatSQL(ctx context.Context) (string, error)

type Type

type Type struct {
	Name        string          `json:"name"`
	Kind        int             `json:"kind"`
	ElementType *Type           `json:"elementType"`
	FieldTypes  []*NameWithType `json:"fieldTypes"`
}

func (*Type) IsArray

func (t *Type) IsArray() bool

func (*Type) IsStruct

func (t *Type) IsStruct() bool

func (*Type) ToZetaSQLType

func (t *Type) ToZetaSQLType() (types.Type, error)

type UnnestItemNode

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

func (*UnnestItemNode) FormatSQL

func (n *UnnestItemNode) FormatSQL(ctx context.Context) (string, error)

type UnpivotArgNode

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

func (*UnpivotArgNode) FormatSQL

func (n *UnpivotArgNode) FormatSQL(ctx context.Context) (string, error)

type UnpivotScanNode

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

func (*UnpivotScanNode) FormatSQL

func (n *UnpivotScanNode) FormatSQL(ctx context.Context) (string, error)

type UpdateArrayItemNode

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

func (*UpdateArrayItemNode) FormatSQL

func (n *UpdateArrayItemNode) FormatSQL(ctx context.Context) (string, error)

type UpdateItemNode

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

func (*UpdateItemNode) FormatSQL

func (n *UpdateItemNode) FormatSQL(ctx context.Context) (string, error)

type UpdateStmtNode

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

func (*UpdateStmtNode) FormatSQL

func (n *UpdateStmtNode) FormatSQL(ctx context.Context) (string, error)

type Value

type Value interface {
	Add(Value) (Value, error)
	Sub(Value) (Value, error)
	Mul(Value) (Value, error)
	Div(Value) (Value, error)
	EQ(Value) (bool, error)
	GT(Value) (bool, error)
	GTE(Value) (bool, error)
	LT(Value) (bool, error)
	LTE(Value) (bool, error)
	ToInt64() (int64, error)
	ToString() (string, error)
	ToFloat64() (float64, error)
	ToBool() (bool, error)
	ToArray() (*ArrayValue, error)
	ToStruct() (*StructValue, error)
}

func ArrayValueOf

func ArrayValueOf(v string) (Value, error)

func StructValueOf

func StructValueOf(v string) (Value, error)

func ValueOf

func ValueOf(v interface{}) (Value, error)

type WindowFrameExprNode

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

func (*WindowFrameExprNode) FormatSQL

func (n *WindowFrameExprNode) FormatSQL(ctx context.Context) (string, error)

type WindowFrameNode

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

func (*WindowFrameNode) FormatSQL

func (n *WindowFrameNode) FormatSQL(ctx context.Context) (string, error)

type WindowOrderingNode

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

func (*WindowOrderingNode) FormatSQL

func (n *WindowOrderingNode) FormatSQL(ctx context.Context) (string, error)

type WindowPartitioningNode

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

func (*WindowPartitioningNode) FormatSQL

func (n *WindowPartitioningNode) FormatSQL(ctx context.Context) (string, error)

type WithEntryNode

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

func (*WithEntryNode) FormatSQL

func (n *WithEntryNode) FormatSQL(ctx context.Context) (string, error)

type WithPartitionColumnsNode

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

func (*WithPartitionColumnsNode) FormatSQL

func (n *WithPartitionColumnsNode) FormatSQL(ctx context.Context) (string, error)

type WithRefScanNode

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

func (*WithRefScanNode) FormatSQL

func (n *WithRefScanNode) FormatSQL(ctx context.Context) (string, error)

type WithScanNode

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

func (*WithScanNode) FormatSQL

func (n *WithScanNode) FormatSQL(ctx context.Context) (string, error)

type ZetaSQLiteConn

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

func (*ZetaSQLiteConn) AddNamePath

func (c *ZetaSQLiteConn) AddNamePath(path string)

func (*ZetaSQLiteConn) Begin

func (c *ZetaSQLiteConn) Begin() (driver.Tx, error)

func (*ZetaSQLiteConn) CheckNamedValue

func (s *ZetaSQLiteConn) CheckNamedValue(value *driver.NamedValue) error

func (*ZetaSQLiteConn) Close

func (c *ZetaSQLiteConn) Close() error

func (*ZetaSQLiteConn) ExecContext

func (c *ZetaSQLiteConn) ExecContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Result, error)

func (*ZetaSQLiteConn) NamePath

func (c *ZetaSQLiteConn) NamePath() []string

func (*ZetaSQLiteConn) Prepare

func (c *ZetaSQLiteConn) Prepare(query string) (driver.Stmt, error)

func (*ZetaSQLiteConn) QueryContext

func (c *ZetaSQLiteConn) QueryContext(ctx context.Context, query string, args []driver.NamedValue) (driver.Rows, error)

func (*ZetaSQLiteConn) SetNamePath

func (c *ZetaSQLiteConn) SetNamePath(path []string)

type ZetaSQLiteDriver

type ZetaSQLiteDriver struct {
	ConnectHook func(*ZetaSQLiteConn) error
}

func (*ZetaSQLiteDriver) Open

func (d *ZetaSQLiteDriver) Open(name string) (driver.Conn, error)

type ZetaSQLiteTx

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

func (*ZetaSQLiteTx) Commit

func (tx *ZetaSQLiteTx) Commit() error

func (*ZetaSQLiteTx) Rollback

func (tx *ZetaSQLiteTx) Rollback() error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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