mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-26 19:41:37 +08:00
Avoid publicly exporting constants from libsqlite3-sys multiple times.
This commit is contained in:
parent
ccf1f61127
commit
a13df1e3cd
@ -1,3 +1,7 @@
|
|||||||
|
# Version 0.10.2 (UPCOMING)
|
||||||
|
|
||||||
|
* Avoid publicly exporting SQLite constants multiple times from libsqlite3-sys.
|
||||||
|
|
||||||
# Version 0.10.1 (2017-03-03)
|
# Version 0.10.1 (2017-03-03)
|
||||||
|
|
||||||
* Updates the `bundled` SQLite version to 3.17.0.
|
* Updates the `bundled` SQLite version to 3.17.0.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "libsqlite3-sys"
|
name = "libsqlite3-sys"
|
||||||
version = "0.7.1"
|
version = "0.7.2"
|
||||||
authors = ["John Gallagher <jgallagher@bignerdranch.com>"]
|
authors = ["John Gallagher <jgallagher@bignerdranch.com>"]
|
||||||
repository = "https://github.com/jgallagher/rusqlite"
|
repository = "https://github.com/jgallagher/rusqlite"
|
||||||
description = "Native bindings to the libsqlite3 library"
|
description = "Native bindings to the libsqlite3 library"
|
||||||
|
@ -110,95 +110,98 @@ impl error::Error for Error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Result codes.
|
// Result codes.
|
||||||
|
// Note: These are not public because our bindgen bindings export whichever constants are present
|
||||||
|
// in the current version of SQLite. We repeat them here so we don't have to worry about which
|
||||||
|
// version of SQLite added which constants, and we only use them to implement code_to_str below.
|
||||||
|
|
||||||
pub const SQLITE_OK : c_int = 0;
|
const SQLITE_OK : c_int = 0;
|
||||||
pub const SQLITE_ERROR : c_int = 1;
|
const SQLITE_ERROR : c_int = 1;
|
||||||
pub const SQLITE_INTERNAL : c_int = 2;
|
const SQLITE_INTERNAL : c_int = 2;
|
||||||
pub const SQLITE_PERM : c_int = 3;
|
const SQLITE_PERM : c_int = 3;
|
||||||
pub const SQLITE_ABORT : c_int = 4;
|
const SQLITE_ABORT : c_int = 4;
|
||||||
pub const SQLITE_BUSY : c_int = 5;
|
const SQLITE_BUSY : c_int = 5;
|
||||||
pub const SQLITE_LOCKED : c_int = 6;
|
const SQLITE_LOCKED : c_int = 6;
|
||||||
pub const SQLITE_NOMEM : c_int = 7;
|
const SQLITE_NOMEM : c_int = 7;
|
||||||
pub const SQLITE_READONLY : c_int = 8;
|
const SQLITE_READONLY : c_int = 8;
|
||||||
pub const SQLITE_INTERRUPT : c_int = 9;
|
const SQLITE_INTERRUPT : c_int = 9;
|
||||||
pub const SQLITE_IOERR : c_int = 10;
|
const SQLITE_IOERR : c_int = 10;
|
||||||
pub const SQLITE_CORRUPT : c_int = 11;
|
const SQLITE_CORRUPT : c_int = 11;
|
||||||
pub const SQLITE_NOTFOUND : c_int = 12;
|
const SQLITE_NOTFOUND : c_int = 12;
|
||||||
pub const SQLITE_FULL : c_int = 13;
|
const SQLITE_FULL : c_int = 13;
|
||||||
pub const SQLITE_CANTOPEN : c_int = 14;
|
const SQLITE_CANTOPEN : c_int = 14;
|
||||||
pub const SQLITE_PROTOCOL : c_int = 15;
|
const SQLITE_PROTOCOL : c_int = 15;
|
||||||
pub const SQLITE_EMPTY : c_int = 16;
|
const SQLITE_EMPTY : c_int = 16;
|
||||||
pub const SQLITE_SCHEMA : c_int = 17;
|
const SQLITE_SCHEMA : c_int = 17;
|
||||||
pub const SQLITE_TOOBIG : c_int = 18;
|
const SQLITE_TOOBIG : c_int = 18;
|
||||||
pub const SQLITE_CONSTRAINT: c_int = 19;
|
const SQLITE_CONSTRAINT: c_int = 19;
|
||||||
pub const SQLITE_MISMATCH : c_int = 20;
|
const SQLITE_MISMATCH : c_int = 20;
|
||||||
pub const SQLITE_MISUSE : c_int = 21;
|
const SQLITE_MISUSE : c_int = 21;
|
||||||
pub const SQLITE_NOLFS : c_int = 22;
|
const SQLITE_NOLFS : c_int = 22;
|
||||||
pub const SQLITE_AUTH : c_int = 23;
|
const SQLITE_AUTH : c_int = 23;
|
||||||
pub const SQLITE_FORMAT : c_int = 24;
|
const SQLITE_FORMAT : c_int = 24;
|
||||||
pub const SQLITE_RANGE : c_int = 25;
|
const SQLITE_RANGE : c_int = 25;
|
||||||
pub const SQLITE_NOTADB : c_int = 26;
|
const SQLITE_NOTADB : c_int = 26;
|
||||||
pub const SQLITE_NOTICE : c_int = 27;
|
const SQLITE_NOTICE : c_int = 27;
|
||||||
pub const SQLITE_WARNING : c_int = 28;
|
const SQLITE_WARNING : c_int = 28;
|
||||||
pub const SQLITE_ROW : c_int = 100;
|
const SQLITE_ROW : c_int = 100;
|
||||||
pub const SQLITE_DONE : c_int = 101;
|
const SQLITE_DONE : c_int = 101;
|
||||||
|
|
||||||
// Extended result codes.
|
// Extended result codes.
|
||||||
|
|
||||||
pub const SQLITE_IOERR_READ : c_int = (SQLITE_IOERR | (1<<8));
|
const SQLITE_IOERR_READ : c_int = (SQLITE_IOERR | (1<<8));
|
||||||
pub const SQLITE_IOERR_SHORT_READ : c_int = (SQLITE_IOERR | (2<<8));
|
const SQLITE_IOERR_SHORT_READ : c_int = (SQLITE_IOERR | (2<<8));
|
||||||
pub const SQLITE_IOERR_WRITE : c_int = (SQLITE_IOERR | (3<<8));
|
const SQLITE_IOERR_WRITE : c_int = (SQLITE_IOERR | (3<<8));
|
||||||
pub const SQLITE_IOERR_FSYNC : c_int = (SQLITE_IOERR | (4<<8));
|
const SQLITE_IOERR_FSYNC : c_int = (SQLITE_IOERR | (4<<8));
|
||||||
pub const SQLITE_IOERR_DIR_FSYNC : c_int = (SQLITE_IOERR | (5<<8));
|
const SQLITE_IOERR_DIR_FSYNC : c_int = (SQLITE_IOERR | (5<<8));
|
||||||
pub const SQLITE_IOERR_TRUNCATE : c_int = (SQLITE_IOERR | (6<<8));
|
const SQLITE_IOERR_TRUNCATE : c_int = (SQLITE_IOERR | (6<<8));
|
||||||
pub const SQLITE_IOERR_FSTAT : c_int = (SQLITE_IOERR | (7<<8));
|
const SQLITE_IOERR_FSTAT : c_int = (SQLITE_IOERR | (7<<8));
|
||||||
pub const SQLITE_IOERR_UNLOCK : c_int = (SQLITE_IOERR | (8<<8));
|
const SQLITE_IOERR_UNLOCK : c_int = (SQLITE_IOERR | (8<<8));
|
||||||
pub const SQLITE_IOERR_RDLOCK : c_int = (SQLITE_IOERR | (9<<8));
|
const SQLITE_IOERR_RDLOCK : c_int = (SQLITE_IOERR | (9<<8));
|
||||||
pub const SQLITE_IOERR_DELETE : c_int = (SQLITE_IOERR | (10<<8));
|
const SQLITE_IOERR_DELETE : c_int = (SQLITE_IOERR | (10<<8));
|
||||||
pub const SQLITE_IOERR_BLOCKED : c_int = (SQLITE_IOERR | (11<<8));
|
const SQLITE_IOERR_BLOCKED : c_int = (SQLITE_IOERR | (11<<8));
|
||||||
pub const SQLITE_IOERR_NOMEM : c_int = (SQLITE_IOERR | (12<<8));
|
const SQLITE_IOERR_NOMEM : c_int = (SQLITE_IOERR | (12<<8));
|
||||||
pub const SQLITE_IOERR_ACCESS : c_int = (SQLITE_IOERR | (13<<8));
|
const SQLITE_IOERR_ACCESS : c_int = (SQLITE_IOERR | (13<<8));
|
||||||
pub const SQLITE_IOERR_CHECKRESERVEDLOCK : c_int = (SQLITE_IOERR | (14<<8));
|
const SQLITE_IOERR_CHECKRESERVEDLOCK : c_int = (SQLITE_IOERR | (14<<8));
|
||||||
pub const SQLITE_IOERR_LOCK : c_int = (SQLITE_IOERR | (15<<8));
|
const SQLITE_IOERR_LOCK : c_int = (SQLITE_IOERR | (15<<8));
|
||||||
pub const SQLITE_IOERR_CLOSE : c_int = (SQLITE_IOERR | (16<<8));
|
const SQLITE_IOERR_CLOSE : c_int = (SQLITE_IOERR | (16<<8));
|
||||||
pub const SQLITE_IOERR_DIR_CLOSE : c_int = (SQLITE_IOERR | (17<<8));
|
const SQLITE_IOERR_DIR_CLOSE : c_int = (SQLITE_IOERR | (17<<8));
|
||||||
pub const SQLITE_IOERR_SHMOPEN : c_int = (SQLITE_IOERR | (18<<8));
|
const SQLITE_IOERR_SHMOPEN : c_int = (SQLITE_IOERR | (18<<8));
|
||||||
pub const SQLITE_IOERR_SHMSIZE : c_int = (SQLITE_IOERR | (19<<8));
|
const SQLITE_IOERR_SHMSIZE : c_int = (SQLITE_IOERR | (19<<8));
|
||||||
pub const SQLITE_IOERR_SHMLOCK : c_int = (SQLITE_IOERR | (20<<8));
|
const SQLITE_IOERR_SHMLOCK : c_int = (SQLITE_IOERR | (20<<8));
|
||||||
pub const SQLITE_IOERR_SHMMAP : c_int = (SQLITE_IOERR | (21<<8));
|
const SQLITE_IOERR_SHMMAP : c_int = (SQLITE_IOERR | (21<<8));
|
||||||
pub const SQLITE_IOERR_SEEK : c_int = (SQLITE_IOERR | (22<<8));
|
const SQLITE_IOERR_SEEK : c_int = (SQLITE_IOERR | (22<<8));
|
||||||
pub const SQLITE_IOERR_DELETE_NOENT : c_int = (SQLITE_IOERR | (23<<8));
|
const SQLITE_IOERR_DELETE_NOENT : c_int = (SQLITE_IOERR | (23<<8));
|
||||||
pub const SQLITE_IOERR_MMAP : c_int = (SQLITE_IOERR | (24<<8));
|
const SQLITE_IOERR_MMAP : c_int = (SQLITE_IOERR | (24<<8));
|
||||||
pub const SQLITE_IOERR_GETTEMPPATH : c_int = (SQLITE_IOERR | (25<<8));
|
const SQLITE_IOERR_GETTEMPPATH : c_int = (SQLITE_IOERR | (25<<8));
|
||||||
pub const SQLITE_IOERR_CONVPATH : c_int = (SQLITE_IOERR | (26<<8));
|
const SQLITE_IOERR_CONVPATH : c_int = (SQLITE_IOERR | (26<<8));
|
||||||
pub const SQLITE_IOERR_VNODE : c_int = (SQLITE_IOERR | (27<<8));
|
const SQLITE_IOERR_VNODE : c_int = (SQLITE_IOERR | (27<<8));
|
||||||
pub const SQLITE_LOCKED_SHAREDCACHE : c_int = (SQLITE_LOCKED | (1<<8));
|
const SQLITE_LOCKED_SHAREDCACHE : c_int = (SQLITE_LOCKED | (1<<8));
|
||||||
pub const SQLITE_BUSY_RECOVERY : c_int = (SQLITE_BUSY | (1<<8));
|
const SQLITE_BUSY_RECOVERY : c_int = (SQLITE_BUSY | (1<<8));
|
||||||
pub const SQLITE_BUSY_SNAPSHOT : c_int = (SQLITE_BUSY | (2<<8));
|
const SQLITE_BUSY_SNAPSHOT : c_int = (SQLITE_BUSY | (2<<8));
|
||||||
pub const SQLITE_CANTOPEN_NOTEMPDIR : c_int = (SQLITE_CANTOPEN | (1<<8));
|
const SQLITE_CANTOPEN_NOTEMPDIR : c_int = (SQLITE_CANTOPEN | (1<<8));
|
||||||
pub const SQLITE_CANTOPEN_ISDIR : c_int = (SQLITE_CANTOPEN | (2<<8));
|
const SQLITE_CANTOPEN_ISDIR : c_int = (SQLITE_CANTOPEN | (2<<8));
|
||||||
pub const SQLITE_CANTOPEN_FULLPATH : c_int = (SQLITE_CANTOPEN | (3<<8));
|
const SQLITE_CANTOPEN_FULLPATH : c_int = (SQLITE_CANTOPEN | (3<<8));
|
||||||
pub const SQLITE_CANTOPEN_CONVPATH : c_int = (SQLITE_CANTOPEN | (4<<8));
|
const SQLITE_CANTOPEN_CONVPATH : c_int = (SQLITE_CANTOPEN | (4<<8));
|
||||||
pub const SQLITE_CORRUPT_VTAB : c_int = (SQLITE_CORRUPT | (1<<8));
|
const SQLITE_CORRUPT_VTAB : c_int = (SQLITE_CORRUPT | (1<<8));
|
||||||
pub const SQLITE_READONLY_RECOVERY : c_int = (SQLITE_READONLY | (1<<8));
|
const SQLITE_READONLY_RECOVERY : c_int = (SQLITE_READONLY | (1<<8));
|
||||||
pub const SQLITE_READONLY_CANTLOCK : c_int = (SQLITE_READONLY | (2<<8));
|
const SQLITE_READONLY_CANTLOCK : c_int = (SQLITE_READONLY | (2<<8));
|
||||||
pub const SQLITE_READONLY_ROLLBACK : c_int = (SQLITE_READONLY | (3<<8));
|
const SQLITE_READONLY_ROLLBACK : c_int = (SQLITE_READONLY | (3<<8));
|
||||||
pub const SQLITE_READONLY_DBMOVED : c_int = (SQLITE_READONLY | (4<<8));
|
const SQLITE_READONLY_DBMOVED : c_int = (SQLITE_READONLY | (4<<8));
|
||||||
pub const SQLITE_ABORT_ROLLBACK : c_int = (SQLITE_ABORT | (2<<8));
|
const SQLITE_ABORT_ROLLBACK : c_int = (SQLITE_ABORT | (2<<8));
|
||||||
pub const SQLITE_CONSTRAINT_CHECK : c_int = (SQLITE_CONSTRAINT | (1<<8));
|
const SQLITE_CONSTRAINT_CHECK : c_int = (SQLITE_CONSTRAINT | (1<<8));
|
||||||
pub const SQLITE_CONSTRAINT_COMMITHOOK : c_int = (SQLITE_CONSTRAINT | (2<<8));
|
const SQLITE_CONSTRAINT_COMMITHOOK : c_int = (SQLITE_CONSTRAINT | (2<<8));
|
||||||
pub const SQLITE_CONSTRAINT_FOREIGNKEY : c_int = (SQLITE_CONSTRAINT | (3<<8));
|
const SQLITE_CONSTRAINT_FOREIGNKEY : c_int = (SQLITE_CONSTRAINT | (3<<8));
|
||||||
pub const SQLITE_CONSTRAINT_FUNCTION : c_int = (SQLITE_CONSTRAINT | (4<<8));
|
const SQLITE_CONSTRAINT_FUNCTION : c_int = (SQLITE_CONSTRAINT | (4<<8));
|
||||||
pub const SQLITE_CONSTRAINT_NOTNULL : c_int = (SQLITE_CONSTRAINT | (5<<8));
|
const SQLITE_CONSTRAINT_NOTNULL : c_int = (SQLITE_CONSTRAINT | (5<<8));
|
||||||
pub const SQLITE_CONSTRAINT_PRIMARYKEY : c_int = (SQLITE_CONSTRAINT | (6<<8));
|
const SQLITE_CONSTRAINT_PRIMARYKEY : c_int = (SQLITE_CONSTRAINT | (6<<8));
|
||||||
pub const SQLITE_CONSTRAINT_TRIGGER : c_int = (SQLITE_CONSTRAINT | (7<<8));
|
const SQLITE_CONSTRAINT_TRIGGER : c_int = (SQLITE_CONSTRAINT | (7<<8));
|
||||||
pub const SQLITE_CONSTRAINT_UNIQUE : c_int = (SQLITE_CONSTRAINT | (8<<8));
|
const SQLITE_CONSTRAINT_UNIQUE : c_int = (SQLITE_CONSTRAINT | (8<<8));
|
||||||
pub const SQLITE_CONSTRAINT_VTAB : c_int = (SQLITE_CONSTRAINT | (9<<8));
|
const SQLITE_CONSTRAINT_VTAB : c_int = (SQLITE_CONSTRAINT | (9<<8));
|
||||||
pub const SQLITE_CONSTRAINT_ROWID : c_int = (SQLITE_CONSTRAINT |(10<<8));
|
const SQLITE_CONSTRAINT_ROWID : c_int = (SQLITE_CONSTRAINT |(10<<8));
|
||||||
pub const SQLITE_NOTICE_RECOVER_WAL : c_int = (SQLITE_NOTICE | (1<<8));
|
const SQLITE_NOTICE_RECOVER_WAL : c_int = (SQLITE_NOTICE | (1<<8));
|
||||||
pub const SQLITE_NOTICE_RECOVER_ROLLBACK : c_int = (SQLITE_NOTICE | (2<<8));
|
const SQLITE_NOTICE_RECOVER_ROLLBACK : c_int = (SQLITE_NOTICE | (2<<8));
|
||||||
pub const SQLITE_WARNING_AUTOINDEX : c_int = (SQLITE_WARNING | (1<<8));
|
const SQLITE_WARNING_AUTOINDEX : c_int = (SQLITE_WARNING | (1<<8));
|
||||||
pub const SQLITE_AUTH_USER : c_int = (SQLITE_AUTH | (1<<8));
|
const SQLITE_AUTH_USER : c_int = (SQLITE_AUTH | (1<<8));
|
||||||
|
|
||||||
pub fn code_to_str(code: c_int) -> &'static str {
|
pub fn code_to_str(code: c_int) -> &'static str {
|
||||||
match code {
|
match code {
|
||||||
|
Loading…
Reference in New Issue
Block a user