{"modulePath":"github.com/actiontech/qlbridge","version":"v0.0.0-20181026023605-fc2d5205dad3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package sqlite\n\nPackage sqlite implements a Qlbridge Datasource interface around sqlite that translates mysql syntax to sqlite.\n\nsqlite implements a Qlbridge Datasource interface around sqlite.\n\n## Constants\n\n```go\nconst (\n\t// SourceType \"sqlite\" is the registered Source name in the qlbridge source registry\n\tSourceType = \"sqlite\"\n)\n```\n\n## Functions\n\n```go\nfunc MakeId(dv driver.Value) uint64\n```\n\n```go\nfunc TableToString(tbl *schema.Table) string\n```\nTableToString Table output a CREATE TABLE statement using mysql dialect.\n\n```go\nfunc TypeFromString(t string) value.ValueType\n```\nTypeFromString given a string, return data type\n\n```go\nfunc ValueString(t value.ValueType) string\n```\nValueString convert a value.ValueType into a sqlite type descriptor\n\n```go\nfunc WriteField(w *bytes.Buffer, fld *schema.Field)\n```\nWriteField write a schema.Field as string output for sqlite create statement\n\n[https://www.sqlite.org/datatype3.html](https://www.sqlite.org/datatype3.html)\n\n## Types\n\n```go\ntype Key struct {\n\tId uint64\n}\n```\nKey implements Key and Sort interfaces.\n\n```go\nfunc NewKey(key uint64) *Key\n```\n\n```go\nfunc (m *Key) Key() driver.Value\n```\n\n```go\nfunc (m *Key) Less(than btree.Item) bool\n```\n\n```go\ntype Source struct {\n\t// contains filtered or unexported fields\n}\n```\nSource implements qlbridge DataSource to a sqlite file based source.\n\nFeatures - Support full predicate push down to SqlLite. - Support Thread-Safe wrapper around sqlite file.\n\n```go\nfunc (m *Source) Close() error\n```\nClose this source, closing the underlying sqlite db file\n\n```go\nfunc (m *Source) Init()\n```\nInit the source\n\n```go\nfunc (m *Source) Open(table string) (schema.Conn, error)\n```\nOpen a connection, since sqlite is not threadsafe, this is locked.\n\n```go\nfunc (m *Source) Setup(s *schema.Schema) error\n```\nSetup this source with schema from parent.\n\n```go\nfunc (m *Source) Table(table string) (*schema.Table, error)\n```\nTable gets table schema for given table\n\n```go\nfunc (m *Source) Tables() []string\n```\nTables gets list of tables\n\n","path":"github.com/actiontech/qlbridge/datasource/sqlite","name":"sqlite","synopsis":"Package sqlite implements a Qlbridge Datasource interface around sqlite that translates mysql syntax to sqlite.","isRedistributable":true}
