vtabutil

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2024 License: MIT Imports: 7 Imported by: 0

README

Virtual Table utility functions

This package implements utilities mostly useful to virtual table implementations.

It also wraps a parser for the CREATE and ALTER TABLE commands, created by Marco Bambini.

Documentation

Overview

Package vtabutil implements virtual table utility functions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NamedArg

func NamedArg(arg string) (key, val string)

NamedArg splits an named arg into a key and value, around an equals sign. Spaces are trimmed around both key and value.

func Unquote

func Unquote(val string) string

Unquote unquotes a string.

Types

type Column added in v0.16.3

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

Column holds metadata about a column.

func (Column) Type added in v0.16.3

func (c Column) Type() string

Type returns the declared type of a column.

https://sqlite.org/lang_createtable.html#column_data_types

type Table added in v0.16.3

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

Table holds metadata about a table.

func Parse added in v0.16.3

func Parse(sql string) (_ *Table, err error)

Parse parses a CREATE or ALTER TABLE command.

func (*Table) Close added in v0.16.3

func (t *Table) Close() error

Close closes a table handle.

func (*Table) Column added in v0.16.3

func (t *Table) Column(i int) Column

Column returns data for the ith column of the table.

https://sqlite.org/lang_createtable.html#column_definitions

func (*Table) NumColumns added in v0.16.3

func (t *Table) NumColumns() int

NumColumns returns the number of columns of the table.

Jump to

Keyboard shortcuts

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