Documentation
¶
Overview ¶
Package sqlite is meta.Metadata on top of SQLite (ncruces/go-sqlite3: pure Go, no cgo).
It mirrors what the Java plug-in sees through xerial sqlite-jdbc (reference: 3.53):
- query columns have no type before execution: java.lang.Object; precision/scale from the parentheses of the declared type, display is always 2147483647;
- the real types come from getColumns: the declared type is classified by substrings;
- getIndexInfo ignores the unique flag: unique == indexed;
- auto-increment is only for columns with AUTOINCREMENT.
Verified with MetaDump.java on internal/meta/testdata/sqlite.txt.
Index ¶
- type DB
- func (db *DB) Close() error
- func (db *DB) Exec(sql string) error
- func (db *DB) IdentifierQuote() string
- func (db *DB) ImportedKeys(table string) ([]meta.ImportedKey, error)
- func (db *DB) PKColNames(tableRef string) ([]string, error)
- func (db *DB) RawOfJava(javaType string) string
- func (db *DB) SQLColumns(jdbcSQL string) ([]meta.Column, error)
- func (db *DB) SQLParams(jdbcSQL string, typeCount int) (*meta.Params, error)
- func (db *DB) Table(tableRef string) (*meta.Table, error)
- func (db *DB) Tables(includeViews bool) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
// contains filtered or unexported fields
}
func OpenReadOnly ¶
OpenReadOnly opens the project database file: generation writes nothing and does not create an empty database on a typo in the path.
func (*DB) IdentifierQuote ¶ added in v1.1.2
IdentifierQuote: as getIdentifierQuoteString of xerial.
func (*DB) ImportedKeys ¶
func (db *DB) ImportedKeys(table string) ([]meta.ImportedKey, error)
ImportedKeys: id of pragma_foreign_key_list counts the constraints backwards, so "id desc" is the order of declaration.
Click to show internal directories.
Click to hide internal directories.