mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-07-07 12:35:00 +00:00
Move series extension to core
It's part of upstream SQLite too.
This commit is contained in:
parent
c3250b64a6
commit
60191e7c7b
7 changed files with 12 additions and 53 deletions
22
Cargo.lock
generated
22
Cargo.lock
generated
|
@ -852,16 +852,6 @@ dependencies = [
|
|||
"regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.8.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3"
|
||||
dependencies = [
|
||||
"log",
|
||||
"regex",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "env_logger"
|
||||
version = "0.10.2"
|
||||
|
@ -1791,16 +1781,6 @@ dependencies = [
|
|||
"turso_ext",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "limbo_series"
|
||||
version = "0.1.0-pre.2"
|
||||
dependencies = [
|
||||
"mimalloc",
|
||||
"quickcheck",
|
||||
"quickcheck_macros",
|
||||
"turso_ext",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "limbo_sim"
|
||||
version = "0.1.0-pre.2"
|
||||
|
@ -2618,8 +2598,6 @@ version = "1.0.3"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6"
|
||||
dependencies = [
|
||||
"env_logger 0.8.4",
|
||||
"log",
|
||||
"rand 0.8.5",
|
||||
]
|
||||
|
||||
|
|
|
@ -17,7 +17,6 @@ members = [
|
|||
"extensions/csv",
|
||||
"extensions/percentile",
|
||||
"extensions/regexp",
|
||||
"extensions/series",
|
||||
"extensions/tests",
|
||||
"macros",
|
||||
"simulator",
|
||||
|
@ -47,7 +46,6 @@ limbo_ipaddr = { path = "extensions/ipaddr", version = "0.1.0-pre.2" }
|
|||
turso_macros = { path = "macros", version = "0.1.0-pre.2" }
|
||||
limbo_percentile = { path = "extensions/percentile", version = "0.1.0-pre.2" }
|
||||
limbo_regexp = { path = "extensions/regexp", version = "0.1.0-pre.2" }
|
||||
limbo_series = { path = "extensions/series", version = "0.1.0-pre.2" }
|
||||
turso_sqlite3_parser = { path = "vendored/sqlite3-parser", version = "0.1.0-pre.2" }
|
||||
limbo_uuid = { path = "extensions/uuid", version = "0.1.0-pre.2" }
|
||||
strum = { version = "0.26", features = ["derive"] }
|
||||
|
|
|
@ -15,7 +15,7 @@ path = "lib.rs"
|
|||
|
||||
[features]
|
||||
antithesis = ["dep:antithesis_sdk"]
|
||||
default = ["fs", "uuid", "time", "json"]
|
||||
default = ["fs", "uuid", "time", "json", "series"]
|
||||
fs = ["turso_ext/vfs"]
|
||||
json = []
|
||||
uuid = ["dep:uuid"]
|
||||
|
@ -25,6 +25,7 @@ fuzz = []
|
|||
omit_autovacuum = []
|
||||
simulator = ["fuzz", "serde"]
|
||||
serde = ["dep:serde"]
|
||||
series = []
|
||||
|
||||
[target.'cfg(target_os = "linux")'.dependencies]
|
||||
io-uring = { version = "0.7.5", optional = true }
|
||||
|
|
|
@ -174,6 +174,8 @@ impl Connection {
|
|||
let mut ext_api = self.build_turso_ext();
|
||||
#[cfg(feature = "uuid")]
|
||||
crate::uuid::register_extension(&mut ext_api);
|
||||
#[cfg(feature = "series")]
|
||||
crate::series::register_extension(&mut ext_api);
|
||||
#[cfg(feature = "fs")]
|
||||
{
|
||||
let vfslist = add_builtin_vfs_extensions(Some(ext_api)).map_err(|e| e.to_string())?;
|
||||
|
|
|
@ -16,6 +16,8 @@ mod pragma;
|
|||
mod pseudo;
|
||||
pub mod result;
|
||||
mod schema;
|
||||
#[cfg(feature = "series")]
|
||||
mod series;
|
||||
mod storage;
|
||||
#[allow(dead_code)]
|
||||
#[cfg(feature = "time")]
|
||||
|
|
|
@ -1,12 +1,15 @@
|
|||
use std::sync::Arc;
|
||||
|
||||
use turso_ext::{
|
||||
register_extension, Connection, ResultCode, VTabCursor, VTabKind, VTabModule, VTabModuleDerive,
|
||||
Connection, ExtensionApi, ResultCode, VTabCursor, VTabKind, VTabModule, VTabModuleDerive,
|
||||
VTable, Value,
|
||||
};
|
||||
|
||||
register_extension! {
|
||||
vtabs: { GenerateSeriesVTabModule }
|
||||
pub fn register_extension(ext_api: &mut ExtensionApi) {
|
||||
// FIXME: Add macro magic to register functions automatically.
|
||||
unsafe {
|
||||
GenerateSeriesVTabModule::register_GenerateSeriesVTabModule(ext_api);
|
||||
}
|
||||
}
|
||||
|
||||
macro_rules! try_option {
|
|
@ -1,25 +0,0 @@
|
|||
[package]
|
||||
name = "limbo_series"
|
||||
version.workspace = true
|
||||
authors.workspace = true
|
||||
edition.workspace = true
|
||||
license.workspace = true
|
||||
repository.workspace = true
|
||||
description = "Limbo series extension"
|
||||
|
||||
[features]
|
||||
static = ["turso_ext/static"]
|
||||
|
||||
[lib]
|
||||
crate-type = ["cdylib", "lib"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
turso_ext = { workspace = true, features = ["static"] }
|
||||
|
||||
[target.'cfg(not(target_family = "wasm"))'.dependencies]
|
||||
mimalloc = { version = "0.1", default-features = false }
|
||||
|
||||
[dev-dependencies]
|
||||
quickcheck = "1.0.3"
|
||||
quickcheck_macros = "1.0.0"
|
Loading…
Add table
Add a link
Reference in a new issue