{"modulePath":"github.com/mutablelogic/go-accessory","version":"v0.0.3","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package sqlite\n\nPackage sqlite provides bindings for sqlite 3.\n\n## Constants\n\n```go\nconst (\n\tDefaultSchema = \"main\"\n\tDefaultMemory = \":memory:\"\n\tDefaultFlags  = SQLITE_OPEN_CREATE | SQLITE_OPEN_READWRITE\n)\n```\n\n## Functions\n\n```go\nfunc KeywordCheck(v string) bool\n```\nLookup keyword\n\n```go\nfunc KeywordCount() int\n```\nReturn number of keywords\n\n```go\nfunc KeywordName(index int) string\n```\nReturn keyword\n\n```go\nfunc Version() (string, int, string)\n```\nReturn version\n\n## Types\n\n```go\ntype Conn C.sqlite3\n```\n\n```go\nfunc OpenPath(path string, flags OpenFlags, vfs string) (*Conn, error)\n```\nOpen Path\n\n```go\nfunc OpenUrl(url string, flags OpenFlags, vfs string) (*Conn, error)\n```\nOpen URL\n\n```go\nfunc (c *Conn) Autocommit() bool\n```\nReturn autocommit state\n\n```go\nfunc (c *Conn) CacheFlush() error\n```\nCache Flush\n\n```go\nfunc (c *Conn) Changes() int\n```\nGet number of changes (rows affected)\n\n```go\nfunc (c *Conn) Close() error\n```\nClose Connection\n\n```go\nfunc (c *Conn) Filename(schema string) string\n```\nGet Filename\n\n```go\nfunc (c *Conn) Interrupt()\n```\nInterrupt all queries for connection\n\n```go\nfunc (c *Conn) LastInsertId() int64\n```\nGet last insert id\n\n```go\nfunc (c *Conn) Readonly(schema string) bool\n```\nGet Read-only state. Also returns false if database not found\n\n```go\nfunc (c *Conn) ReleaseMemory() error\n```\nRelease Memory\n\n```go\nfunc (c *Conn) SetExtendedResultCodes(v bool) error\n```\nSet extended result codes\n\n```go\nfunc (c *Conn) SetLastInsertId(v int64)\n```\nSet last insert id\n\n```go\nfunc (c *Conn) String() string\n```\n\n```go\ntype OpenFlags C.int\n```\n\n```go\nconst (\n\tSQLITE_OPEN_NONE         OpenFlags = 0\n\tSQLITE_OPEN_READONLY     OpenFlags = C.SQLITE_OPEN_READONLY     // The database is opened in read-only mode. If the database does not already exist, an error is returned.\n\tSQLITE_OPEN_READWRITE    OpenFlags = C.SQLITE_OPEN_READWRITE    // The database is opened for reading and writing if possible, or reading only if the file is write protected by the operating system. In either case the database must already exist, otherwise an error is returned.\n\tSQLITE_OPEN_CREATE       OpenFlags = C.SQLITE_OPEN_CREATE       // The database is created if it does not already exist\n\tSQLITE_OPEN_URI          OpenFlags = C.SQLITE_OPEN_URI          // The filename can be interpreted as a URI if this flag is set.\n\tSQLITE_OPEN_MEMORY       OpenFlags = C.SQLITE_OPEN_MEMORY       // The database will be opened as an in-memory database. The database is named by the \"filename\" argument for the purposes of cache-sharing, if shared cache mode is enabled, but the \"filename\" is otherwise ignored.\n\tSQLITE_OPEN_NOMUTEX      OpenFlags = C.SQLITE_OPEN_NOMUTEX      // The new database connection will use the \"multi-thread\" threading mode. This means that separate threads are allowed to use SQLite at the same time, as long as each thread is using a different database connection.\n\tSQLITE_OPEN_FULLMUTEX    OpenFlags = C.SQLITE_OPEN_FULLMUTEX    // The new database connection will use the \"serialized\" threading mode. This means the multiple threads can safely attempt to use the same database connection at the same time. (Mutexes will block any actual concurrency, but in this mode there is no harm in trying.)\n\tSQLITE_OPEN_SHAREDCACHE  OpenFlags = C.SQLITE_OPEN_SHAREDCACHE  // The database is opened shared cache enabled, overriding the default shared cache setting provided by sqlite3_enable_shared_cache().\n\tSQLITE_OPEN_PRIVATECACHE OpenFlags = C.SQLITE_OPEN_PRIVATECACHE // The database is opened shared cache disabled, overriding the default shared cache setting provided by sqlite3_enable_shared_cache().\n\t//\tSQLITE_OPEN_NOFOLLOW     OpenFlags = C.SQLITE_OPEN_NOFOLLOW                         // The database filename is not allowed to be a symbolic link\n\tSQLITE_OPEN_MIN = SQLITE_OPEN_READONLY\n\tSQLITE_OPEN_MAX = SQLITE_OPEN_PRIVATECACHE\n)\n```\n\n```go\nfunc (v OpenFlags) String() string\n```\n\n```go\nfunc (v OpenFlags) StringFlag() string\n```\n\n```go\ntype SQAction C.int\n```\n\n```go\nconst (\n\tSQLITE_CREATE_INDEX        SQAction = C.SQLITE_CREATE_INDEX\n\tSQLITE_CREATE_TABLE        SQAction = C.SQLITE_CREATE_TABLE\n\tSQLITE_CREATE_TEMP_INDEX   SQAction = C.SQLITE_CREATE_TEMP_INDEX\n\tSQLITE_CREATE_TEMP_TABLE   SQAction = C.SQLITE_CREATE_TEMP_TABLE\n\tSQLITE_CREATE_TEMP_TRIGGER SQAction = C.SQLITE_CREATE_TEMP_TRIGGER\n\tSQLITE_CREATE_TEMP_VIEW    SQAction = C.SQLITE_CREATE_TEMP_VIEW\n\tSQLITE_CREATE_TRIGGER      SQAction = C.SQLITE_CREATE_TRIGGER\n\tSQLITE_CREATE_VIEW         SQAction = C.SQLITE_CREATE_VIEW\n\tSQLITE_DELETE              SQAction = C.SQLITE_DELETE\n\tSQLITE_DROP_INDEX          SQAction = C.SQLITE_DROP_INDEX\n\tSQLITE_DROP_TABLE          SQAction = C.SQLITE_DROP_TABLE\n\tSQLITE_DROP_TEMP_INDEX     SQAction = C.SQLITE_DROP_TEMP_INDEX\n\tSQLITE_DROP_TEMP_TABLE     SQAction = C.SQLITE_DROP_TEMP_TABLE\n\tSQLITE_DROP_TEMP_TRIGGER   SQAction = C.SQLITE_DROP_TEMP_TRIGGER\n\tSQLITE_DROP_TEMP_VIEW      SQAction = C.SQLITE_DROP_TEMP_VIEW\n\tSQLITE_DROP_TRIGGER        SQAction = C.SQLITE_DROP_TRIGGER\n\tSQLITE_DROP_VIEW           SQAction = C.SQLITE_DROP_VIEW\n\tSQLITE_INSERT              SQAction = C.SQLITE_INSERT\n\tSQLITE_PRAGMA              SQAction = C.SQLITE_PRAGMA\n\tSQLITE_READ                SQAction = C.SQLITE_READ\n\tSQLITE_SELECT              SQAction = C.SQLITE_SELECT\n\tSQLITE_TRANSACTION         SQAction = C.SQLITE_TRANSACTION\n\tSQLITE_UPDATE              SQAction = C.SQLITE_UPDATE\n\tSQLITE_ATTACH              SQAction = C.SQLITE_ATTACH\n\tSQLITE_DETACH              SQAction = C.SQLITE_DETACH\n\tSQLITE_ALTER_TABLE         SQAction = C.SQLITE_ALTER_TABLE\n\tSQLITE_REINDEX             SQAction = C.SQLITE_REINDEX\n\tSQLITE_ANALYZE             SQAction = C.SQLITE_ANALYZE\n\tSQLITE_CREATE_VTABLE       SQAction = C.SQLITE_CREATE_VTABLE\n\tSQLITE_DROP_VTABLE         SQAction = C.SQLITE_DROP_VTABLE\n\tSQLITE_FUNCTION            SQAction = C.SQLITE_FUNCTION\n\tSQLITE_SAVEPOINT           SQAction = C.SQLITE_SAVEPOINT\n\tSQLITE_COPY                SQAction = C.SQLITE_COPY\n\tSQLITE_RECURSIVE           SQAction = C.SQLITE_RECURSIVE\n\tSQLITE_ACTION_MIN                   = SQLITE_CREATE_INDEX\n\tSQLITE_ACTION_MAX                   = SQLITE_RECURSIVE\n)\n```\nRef: [http://www.sqlite.org/c3ref/c\\_limit\\_attached.html](http://www.sqlite.org/c3ref/c_limit_attached.html)\n\n```go\nfunc (v SQAction) String() string\n```\n\n```go\ntype SQAuth C.int\n```\n\n```go\nconst (\n\tSQLITE_ALLOW  SQAuth = SQAuth(SQLITE_OK) /* Operation requested is ok */\n\tSQLITE_DENY   SQAuth = C.SQLITE_DENY     /* Abort the SQL statement with an error */\n\tSQLITE_IGNORE SQAuth = C.SQLITE_IGNORE   /* Don't allow access, but don't generate an error */\n)\n```\n\n```go\nfunc (v SQAuth) String() string\n```\n\n```go\ntype SQError C.int\n```\n\n```go\nconst (\n\tSQLITE_OK         SQError = C.SQLITE_OK         /* Successful result */\n\tSQLITE_ERROR      SQError = C.SQLITE_ERROR      /* Generic error */\n\tSQLITE_INTERNAL   SQError = C.SQLITE_INTERNAL   /* Internal logic error in SQLite */\n\tSQLITE_PERM       SQError = C.SQLITE_PERM       /* Access permission denied */\n\tSQLITE_ABORT      SQError = C.SQLITE_ABORT      /* Callback routine requested an abort */\n\tSQLITE_BUSY       SQError = C.SQLITE_BUSY       /* The database file is locked */\n\tSQLITE_LOCKED     SQError = C.SQLITE_LOCKED     /* A table in the database is locked */\n\tSQLITE_NOMEM      SQError = C.SQLITE_NOMEM      /* A malloc() failed */\n\tSQLITE_READONLY   SQError = C.SQLITE_READONLY   /* Attempt to write a readonly database */\n\tSQLITE_INTERRUPT  SQError = C.SQLITE_INTERRUPT  /* Operation terminated by sqlite3_interrupt()*/\n\tSQLITE_IOERR      SQError = C.SQLITE_IOERR      /* Some kind of disk I/O error occurred */\n\tSQLITE_CORRUPT    SQError = C.SQLITE_CORRUPT    /* The database disk image is malformed */\n\tSQLITE_NOTFOUND   SQError = C.SQLITE_NOTFOUND   /* Unknown opcode in sqlite3_file_control() */\n\tSQLITE_FULL       SQError = C.SQLITE_FULL       /* Insertion failed because database is full */\n\tSQLITE_CANTOPEN   SQError = C.SQLITE_CANTOPEN   /* Unable to open the database file */\n\tSQLITE_PROTOCOL   SQError = C.SQLITE_PROTOCOL   /* Database lock protocol error */\n\tSQLITE_EMPTY      SQError = C.SQLITE_EMPTY      /* Internal use only */\n\tSQLITE_SCHEMA     SQError = C.SQLITE_SCHEMA     /* The database schema changed */\n\tSQLITE_TOOBIG     SQError = C.SQLITE_TOOBIG     /* String or BLOB exceeds size limit */\n\tSQLITE_CONSTRAINT SQError = C.SQLITE_CONSTRAINT /* Abort due to constraint violation */\n\tSQLITE_MISMATCH   SQError = C.SQLITE_MISMATCH   /* Data type mismatch */\n\tSQLITE_MISUSE     SQError = C.SQLITE_MISUSE     /* Library used incorrectly */\n\tSQLITE_NOLFS      SQError = C.SQLITE_NOLFS      /* Uses OS features not supported on host */\n\tSQLITE_AUTH       SQError = C.SQLITE_AUTH       /* Authorization denied */\n\tSQLITE_FORMAT     SQError = C.SQLITE_FORMAT     /* Not used */\n\tSQLITE_RANGE      SQError = C.SQLITE_RANGE      /* 2nd parameter to sqlite3_bind out of range */\n\tSQLITE_NOTADB     SQError = C.SQLITE_NOTADB     /* File opened that is not a database file */\n\tSQLITE_NOTICE     SQError = C.SQLITE_NOTICE     /* Notifications from sqlite3_log() */\n\tSQLITE_WARNING    SQError = C.SQLITE_WARNING    /* Warnings from sqlite3_log() */\n\tSQLITE_ROW        SQError = C.SQLITE_ROW        /* sqlite3_step() has another row ready */\n\tSQLITE_DONE       SQError = C.SQLITE_DONE       /* sqlite3_step() has finished executing */\n)\n```\n\n```go\nfunc (e SQError) Error() string\n```\n\n```go\nfunc (e SQError) With(suffix string) error\n```\n\n```go\ntype TraceType uint\n```\n\n```go\nconst (\n\tSQLITE_TRACE_STMT    TraceType = C.SQLITE_TRACE_STMT\n\tSQLITE_TRACE_PROFILE TraceType = C.SQLITE_TRACE_PROFILE\n\tSQLITE_TRACE_ROW     TraceType = C.SQLITE_TRACE_ROW\n\tSQLITE_TRACE_CLOSE   TraceType = C.SQLITE_TRACE_CLOSE\n\tSQLITE_TRACE_MIN               = SQLITE_TRACE_STMT\n\tSQLITE_TRACE_MAX               = SQLITE_TRACE_CLOSE\n\tSQLITE_TRACE_NONE    TraceType = 0\n)\n```\n\n```go\nfunc (v TraceType) String() string\n```\n\n```go\nfunc (v TraceType) StringFlag() string\n```\n\n","path":"github.com/mutablelogic/go-accessory/pkg/sqlite/sys","name":"sqlite","synopsis":"Package sqlite provides bindings for sqlite 3.","isRedistributable":true}
