mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-23 00:39:20 +08:00
572471c40f
This is behind the `i128_blob` feature. Blobs are stored as 16 byte big-endian values, with their most significant bit flipped. This is so that sorting, comparison, etc all work properly, even with negative numbers. This also allows the representation to be stable across different computers. It's possible that the `FromSql` implementation should handle the case that the real value is stored in an integer. I didn't do this, but would be willing to make the change. I don't think we should store them this way though, since I don't think users would be able to sort/compare them sanely. Support for `u128` is not implemented, as comparison with i128 values would work strangely. This also is consistent with `u64` not being allowed, not that I think that would be reason enough on it's own. The `byteorder` crate is used if this feature is flipped, as it's quite small and implements things more or less optimally. If/when `i128::{to,from}_be_bytes` gets stabilized (https://github.com/rust-lang/rust/issues/52963), we should probably use that instead.
78 lines
2.1 KiB
TOML
78 lines
2.1 KiB
TOML
[package]
|
|
name = "rusqlite"
|
|
version = "0.14.0"
|
|
authors = ["John Gallagher <jgallagher@bignerdranch.com>"]
|
|
description = "Ergonomic wrapper for SQLite"
|
|
repository = "https://github.com/jgallagher/rusqlite"
|
|
documentation = "http://docs.rs/rusqlite/"
|
|
readme = "README.md"
|
|
keywords = ["sqlite", "database", "ffi"]
|
|
license = "MIT"
|
|
categories = ["database"]
|
|
|
|
[badges]
|
|
travis-ci = { repository = "jgallagher/rusqlite" }
|
|
appveyor = { repository = "jgallagher/rusqlite" }
|
|
maintenance = { status = "actively-developed" }
|
|
|
|
[lib]
|
|
name = "rusqlite"
|
|
|
|
[features]
|
|
load_extension = []
|
|
# hot-backup interface: 3.6.11 (2009-02-18)
|
|
backup = ["libsqlite3-sys/min_sqlite_version_3_6_23"]
|
|
# sqlite3_blob_reopen: 3.7.4
|
|
blob = ["libsqlite3-sys/min_sqlite_version_3_7_7"]
|
|
# sqlite3_create_function_v2: 3.7.3 (2010-10-08)
|
|
functions = ["libsqlite3-sys/min_sqlite_version_3_7_7"]
|
|
# sqlite3_log: 3.6.23 (2010-03-09)
|
|
trace = ["libsqlite3-sys/min_sqlite_version_3_6_23"]
|
|
bundled = ["libsqlite3-sys/bundled"]
|
|
buildtime_bindgen = ["libsqlite3-sys/buildtime_bindgen"]
|
|
limits = []
|
|
hooks = []
|
|
i128_blob = ["byteorder"]
|
|
sqlcipher = ["libsqlite3-sys/sqlcipher"]
|
|
unlock_notify = ["libsqlite3-sys/unlock_notify"]
|
|
# xSavepoint, xRelease and xRollbackTo: 3.7.7 (2011-06-23)
|
|
vtab = ["libsqlite3-sys/min_sqlite_version_3_7_7", "lazy_static"]
|
|
csvtab = ["csv", "vtab"]
|
|
# pointer passing interfaces: 3.20.0
|
|
array = ["vtab"]
|
|
|
|
[dependencies]
|
|
time = "0.1.0"
|
|
bitflags = "1.0"
|
|
lru-cache = "0.1"
|
|
chrono = { version = "0.4", optional = true }
|
|
serde_json = { version = "1.0", optional = true }
|
|
csv = { version = "1.0", optional = true }
|
|
lazy_static = { version = "1.0", optional = true }
|
|
byteorder = { version = "1.2", features = ["i128"], optional = true }
|
|
|
|
[dev-dependencies]
|
|
tempdir = "0.3"
|
|
lazy_static = "1.0"
|
|
regex = "1.0"
|
|
|
|
[dependencies.libsqlite3-sys]
|
|
path = "libsqlite3-sys"
|
|
version = "0.9"
|
|
|
|
[[test]]
|
|
name = "config_log"
|
|
harness = false
|
|
|
|
[[test]]
|
|
name = "deny_single_threaded_sqlite_config"
|
|
|
|
[[test]]
|
|
name = "vtab"
|
|
|
|
[package.metadata.docs.rs]
|
|
features = [ "backup", "blob", "chrono", "functions", "limits", "load_extension", "serde_json", "trace", "vtab" ]
|
|
all-features = false
|
|
no-default-features = true
|
|
default-target = "x86_64-unknown-linux-gnu"
|