Versions in this module Expand all Collapse all v0 v0.0.4 Feb 12, 2023 Changes in this version + const AndKeyword + const AsKeyword + const AsteriskSymbol + const BoolKeyword + const BooleanType + const CommaSymbol + const ConcatSymbol + const CreateKeyword + const CreateTableType + const DropKeyword + const EqualsSymbol + const FalseKeyword + const FromKeyword + const GtSymbol + const GteSymbol + const IdentifierType + const IndexKeyword + const InsertKeyword + const InsertType + const IntKeyword + const IntoKeyword + const KeywordType + const LeftParenthesesSymbol + const LimitKeyword + const LtSymbol + const LteSymbol + const NeqSymbol + const NeqSymbol2 + const NullKeyword + const NullType + const NumericType + const OffsetKeyword + const OnKeyword + const OrKeyword + const PlusSymbol + const PrimaryKeyKeyword + const RightParenthesesSymbol + const SelectKeyword + const SelectType + const SemicolonSymbol + const StringType + const SymbolType + const TableKeyword + const TextKeyword + const TrueKeyword + const UniqueKeyword + const ValuesKeyword + const WhereKeyword + var ErrColumnDoesNotExist = errors.New("column does not exist") + var ErrInvalidDatatype = errors.New("invalid datatype") + var ErrInvalidSelectItem = errors.New("select item is not valid") + var ErrMissingValues = errors.New("missing values") + var ErrTableDoesNotExist = errors.New("table does not exist") + func Lex(source string) ([]*token, error) + type Cell interface + AsBool func() *bool + AsInt func() *int32 + AsText func() *string + type ColumnType uint + const BoolType + const IntType + const TextType + func (c ColumnType) String() string + type Cursor struct + Pointer uint + type Database interface + CreateTable func(*createTableStatement) error + Insert func(*InsertStatement) error + Select func(*selectStatement) (*Results, error) + type ExpressionType uint + const LiteralType + func (lt ExpressionType) String() string + type InMemoryBackend struct + func NewMemoryBackend() *InMemoryBackend + func (mb *InMemoryBackend) CreateTable(crt *createTableStatement) error + func (mb *InMemoryBackend) Insert(inst *InsertStatement) error + func (mb *InMemoryBackend) Select(selectStatement *selectStatement) (*Results, error) + type Index struct + Exp string + Name string + PrimaryKey bool + Type string + Unique bool + type InsertStatement struct + Table token + Values *[]*expression + func (s *InsertStatement) String() string + type ResultColumn struct + Name string + NotNull bool + Type ColumnType + type Results struct + Columns []ResultColumn + Rows [][]Cell + func Query(query string, db *Database) (result *Results, isResultPresent bool, error error) + type TableMetadata struct + Columns []ResultColumn + Indexes []Index + Name string