cel2sqlite

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ColumnInfo

type ColumnInfo struct {
	SQLName string
	Type    ColumnType
}

ColumnInfo contains information about a column

type ColumnType

type ColumnType string

ColumnType represents the type of a column for proper SQL generation

const (
	ColumnTypeString                ColumnType = "string"
	ColumnTypeInt                   ColumnType = "int"
	ColumnTypeBool                  ColumnType = "bool"
	ColumnTypeJSON                  ColumnType = "json"
	ColumnTypeJSONArray             ColumnType = "json_array"
	ColumnTypeOverridableField      ColumnType = "overridable"
	ColumnTypeOverridableFieldArray ColumnType = "overridable_array"
	ColumnTypeDyn                   ColumnType = "dyn"
)

type Converter

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

Converter converts CEL expressions to SQLite SQL WHERE clauses

func NewConverter

func NewConverter(columnMap map[string]ColumnInfo, overrides []string) (*Converter, error)

NewConverter creates a new converter with the given column mapping columnMap maps CEL variable names to ColumnInfo

func NewConverterSimple

func NewConverterSimple(columnMap map[string]string) (*Converter, error)

NewConverterSimple creates a converter with simple string column mapping All columns are treated as dynamic type

func (*Converter) Convert

func (c *Converter) Convert(input string) (string, error)

Source Files

  • cel2sqlite.go

Jump to

Keyboard shortcuts

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