Refactor Cargo features to use separate core library versions (#3688)

Co-authored-by: Mees Delzenne <mees.delzenne@gmail.com>
This commit is contained in:
Rushmore Mushambi 2024-03-15 13:21:32 +02:00 committed by GitHub
parent b34cfc72fc
commit f93f4999ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
20 changed files with 159 additions and 61 deletions

88
Cargo.lock generated
View file

@ -5498,7 +5498,8 @@ dependencies = [
"serde",
"serde_json",
"serial_test",
"surrealdb-core",
"surrealdb-core 1.3.0",
"surrealdb-core 2.0.0-alpha.4.0",
"temp-dir",
"test-log",
"thiserror",
@ -5520,7 +5521,90 @@ dependencies = [
[[package]]
name = "surrealdb-core"
version = "1.4.0"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "24b66c830b767da9b8a289877b2ea3c290b6a56482ae604848b977446cdcdda6"
dependencies = [
"addr",
"any_ascii",
"arbitrary",
"argon2",
"async-channel 1.9.0",
"async-executor",
"async-recursion 1.0.5",
"base64 0.21.7",
"bcrypt",
"bincode",
"bytes",
"cedar-policy",
"chrono",
"deunicode",
"dmp",
"echodb",
"foundationdb",
"fst",
"futures",
"fuzzy-matcher",
"geo 0.27.0",
"geo-types",
"hex",
"indxdb",
"ipnet",
"lexicmp",
"md-5",
"nanoid",
"ndarray",
"nom",
"num_cpus",
"object_store",
"once_cell",
"pbkdf2",
"pharos",
"phf",
"pin-project-lite",
"quick_cache",
"radix_trie",
"rand 0.8.5",
"regex",
"regex-syntax 0.8.2",
"reqwest",
"revision",
"ring 0.17.7",
"roaring",
"rocksdb",
"rquickjs",
"rust-stemmers",
"rust_decimal",
"scrypt",
"semver",
"serde",
"serde_json",
"sha1",
"sha2",
"snap",
"speedb",
"storekey",
"surrealdb-derive",
"surrealdb-jsonwebtoken",
"surrealdb-tikv-client",
"surrealkv",
"surrealml-core",
"thiserror",
"tokio",
"tracing",
"trice",
"ulid",
"unicase",
"url",
"uuid",
"wasm-bindgen-futures",
"wasmtimer",
"ws_stream_wasm",
]
[[package]]
name = "surrealdb-core"
version = "2.0.0-alpha.4.0"
dependencies = [
"addr",
"any_ascii",

View file

@ -11,13 +11,13 @@ args = ["check", "--locked", "--workspace"]
category = "CI - CHECK"
command = "cargo"
env = { RUSTFLAGS = "--cfg surrealdb_unstable" }
args = ["check", "--locked", "--package", "surrealdb", "--features", "protocol-ws,protocol-http,kv-mem,kv-indxdb,http,jwks", "--target", "wasm32-unknown-unknown"]
args = ["check", "--locked", "--package", "surrealdb", "--features", "protocol-ws,protocol-http,kv-mem,kv-indxdb,http,jwks,sql2", "--target", "wasm32-unknown-unknown"]
[tasks.ci-clippy]
category = "CI - CHECK"
command = "cargo"
env = { RUSTFLAGS = "--cfg surrealdb_unstable" }
args = ["clippy", "--all-targets", "--features", "storage-mem,storage-rocksdb,storage-speedb,storage-tikv,storage-fdb,scripting,http,jwks", "--tests", "--benches", "--examples", "--bins", "--", "-D", "warnings"]
args = ["clippy", "--all-targets", "--features", "storage-mem,storage-rocksdb,storage-speedb,storage-tikv,storage-fdb,scripting,http,jwks,sql2", "--tests", "--benches", "--examples", "--bins", "--", "-D", "warnings"]
#
# Integration Tests
@ -27,13 +27,13 @@ args = ["clippy", "--all-targets", "--features", "storage-mem,storage-rocksdb,st
category = "CI - INTEGRATION TESTS"
command = "cargo"
env = { RUST_BACKTRACE = 1, RUSTFLAGS = "--cfg surrealdb_unstable", RUST_LOG = { value = "cli_integration=debug", condition = { env_not_set = ["RUST_LOG"] } } }
args = ["test", "--locked", "--no-default-features", "--features", "storage-mem,http,scripting,jwks", "--workspace", "--test", "cli_integration", "--", "cli_integration"]
args = ["test", "--locked", "--no-default-features", "--features", "storage-mem,http,scripting,jwks,sql2", "--workspace", "--test", "cli_integration", "--", "cli_integration"]
[tasks.ci-http-integration]
category = "CI - INTEGRATION TESTS"
command = "cargo"
env = { RUST_BACKTRACE = 1, RUSTFLAGS = "--cfg surrealdb_unstable", RUST_LOG = { value = "http_integration=debug", condition = { env_not_set = ["RUST_LOG"] } } }
args = ["test", "--locked", "--no-default-features", "--features", "storage-mem,http-compression,jwks", "--workspace", "--test", "http_integration", "--", "http_integration"]
args = ["test", "--locked", "--no-default-features", "--features", "storage-mem,http-compression,jwks,sql2", "--workspace", "--test", "http_integration", "--", "http_integration"]
[tasks.ci-ws-integration]
category = "WS - INTEGRATION TESTS"
@ -52,7 +52,7 @@ category = "CI - INTEGRATION TESTS"
command = "cargo"
env = { RUSTFLAGS = "--cfg surrealdb_unstable" }
args = [
"llvm-cov", "--html", "--locked", "--no-default-features", "--features", "storage-mem,scripting,http,jwks", "--workspace", "--",
"llvm-cov", "--html", "--locked", "--no-default-features", "--features", "storage-mem,scripting,http,jwks,sql2", "--workspace", "--",
"--skip", "api_integration",
"--skip", "cli_integration",
"--skip", "http_integration",
@ -66,7 +66,7 @@ category = "CI - INTEGRATION TESTS"
command = "cargo"
env = { RUST_BACKTRACE = 1, RUSTFLAGS = "--cfg surrealdb_unstable", RUSTDOCFLAGS = "--cfg surrealdb_unstable" }
args = [
"test", "--locked", "--no-default-features", "--features", "storage-mem,scripting,http,parser2", "--workspace", "--",
"test", "--locked", "--no-default-features", "--features", "storage-mem,scripting,http,parser2,sql2", "--workspace", "--",
"--skip", "api_integration",
"--skip", "cli_integration",
"--skip", "http_integration",
@ -143,32 +143,32 @@ run_task = "ci-api-integration"
#
[tasks.ci-api-integration-mem]
category = "CI - INTEGRATION TESTS"
env = { _TEST_API_ENGINE = "mem", _TEST_FEATURES = "kv-mem" }
env = { _TEST_API_ENGINE = "mem", _TEST_FEATURES = "kv-mem,sql2" }
run_task = { name = ["test-kvs", "test-api-integration"], fork = true, parallel = true }
[tasks.ci-api-integration-file]
category = "CI - INTEGRATION TESTS"
env = { _TEST_API_ENGINE = "file", _TEST_FEATURES = "kv-rocksdb" }
env = { _TEST_API_ENGINE = "file", _TEST_FEATURES = "kv-rocksdb,sql2" }
run_task = { name = ["test-kvs", "test-api-integration"], fork = true, parallel = true }
[tasks.ci-api-integration-rocksdb]
category = "CI - INTEGRATION TESTS"
env = { _TEST_API_ENGINE = "rocksdb", _TEST_FEATURES = "kv-rocksdb" }
env = { _TEST_API_ENGINE = "rocksdb", _TEST_FEATURES = "kv-rocksdb,sql2" }
run_task = { name = ["test-kvs", "test-api-integration"], fork = true, parallel = true }
[tasks.ci-api-integration-speedb]
category = "CI - INTEGRATION TESTS"
env = { _TEST_API_ENGINE = "speedb", _TEST_FEATURES = "kv-speedb" }
env = { _TEST_API_ENGINE = "speedb", _TEST_FEATURES = "kv-speedb,sql2" }
run_task = { name = ["test-kvs", "test-api-integration"], fork = true, parallel = true }
[tasks.ci-api-integration-fdb]
category = "CI - INTEGRATION TESTS"
env = { _TEST_API_ENGINE = "fdb", _TEST_FEATURES = "kv-fdb-7_1" }
env = { _TEST_API_ENGINE = "fdb", _TEST_FEATURES = "kv-fdb-7_1,sql2" }
run_task = { name = ["test-kvs", "test-api-integration"], fork = true, parallel = false }
[tasks.ci-api-integration-tikv-tests]
category = "CI - INTEGRATION TESTS"
env = { _TEST_API_ENGINE = "tikv", _TEST_FEATURES = "kv-tikv" }
env = { _TEST_API_ENGINE = "tikv", _TEST_FEATURES = "kv-tikv,sql2" }
run_task = { name = ["test-kvs", "test-api-integration"], fork = true, parallel = false }
[tasks.ci-api-integration-tikv]
@ -177,7 +177,7 @@ run_task = { name = ["start-tikv", "ci-api-integration-tikv-tests", "stop-tikv"]
[tasks.ci-api-integration-surrealkv]
category = "CI - INTEGRATION TESTS"
env = { _TEST_API_ENGINE = "surrealkv", _TEST_FEATURES = "kv-surrealkv", RUSTFLAGS = "--cfg surrealdb_unstable" }
env = { _TEST_API_ENGINE = "surrealkv", _TEST_FEATURES = "kv-surrealkv,sql2", RUSTFLAGS = "--cfg surrealdb_unstable" }
run_task = { name = ["test-kvs", "test-api-integration"], fork = true, parallel = false }
@ -289,7 +289,7 @@ args = ["build", "--locked", "--no-default-features", "--features", "storage-mem
category = "CI - BENCHMARK"
command = "cargo"
env = { RUSTFLAGS = "--cfg surrealdb_unstable" }
args = ["bench", "--quiet", "--package", "surrealdb", "--no-default-features", "--features", "kv-mem,scripting,http,jwks", "${@}"]
args = ["bench", "--quiet", "--package", "surrealdb", "--no-default-features", "--features", "kv-mem,scripting,http,jwks,sql2", "${@}"]
#
# Benchmarks - SDB - Per Target
@ -299,7 +299,7 @@ BENCH_WORKER_THREADS = { value = "1", condition = { env_not_set = ["BENCH_WORKER
BENCH_NUM_OPS = { value = "1000", condition = { env_not_set = ["BENCH_NUM_OPS"] } }
BENCH_DURATION = { value = "30", condition = { env_not_set = ["BENCH_DURATION"] } }
BENCH_SAMPLE_SIZE = { value = "10", condition = { env_not_set = ["BENCH_SAMPLE_SIZE"] } }
BENCH_FEATURES = { value = "protocol-ws,kv-mem,kv-rocksdb,kv-fdb-7_1,kv-surrealkv", condition = { env_not_set = ["BENCH_FEATURES"] } }
BENCH_FEATURES = { value = "protocol-ws,kv-mem,kv-rocksdb,kv-fdb-7_1,kv-surrealkv,sql2", condition = { env_not_set = ["BENCH_FEATURES"] } }
RUSTFLAGS = "--cfg surrealdb_unstable"
[tasks.bench-target]

View file

@ -18,14 +18,14 @@ dependencies = ["cargo-upgrade", "cargo-update"]
category = "LOCAL USAGE"
command = "cargo"
env = { RUSTDOCFLAGS = "--cfg surrealdb_unstable" }
args = ["doc", "--open", "--no-deps", "--package", "surrealdb", "--features", "rustls,native-tls,protocol-ws,protocol-http,kv-mem,kv-speedb,kv-rocksdb,kv-tikv,http,scripting,jwks"]
args = ["doc", "--open", "--no-deps", "--package", "surrealdb", "--features", "rustls,native-tls,protocol-ws,protocol-http,kv-mem,kv-speedb,kv-rocksdb,kv-tikv,http,scripting,jwks,sql2"]
# Test
[tasks.test]
category = "LOCAL USAGE"
command = "cargo"
env = { RUSTFLAGS = "--cfg surrealdb_unstable", RUST_MIN_STACK={ value = "4194304", condition = { env_not_set = ["RUST_MIN_STACK"] } } }
args = ["test", "--workspace", "--no-fail-fast"]
env = { RUSTFLAGS = "--cfg surrealdb_unstable", RUSTDOCFLAGS = "--cfg surrealdb_unstable", RUST_MIN_STACK={ value = "4194304", condition = { env_not_set = ["RUST_MIN_STACK"] } } }
args = ["test", "--workspace", "--no-fail-fast", "--features", "sql2"]
# Check
[tasks.cargo-check]
@ -72,7 +72,7 @@ args = ["clean"]
category = "LOCAL USAGE"
command = "cargo"
env = { RUSTFLAGS = "--cfg surrealdb_unstable" }
args = ["bench", "--package", "surrealdb", "--no-default-features", "--features", "kv-mem,http,scripting,jwks", "--", "${@}"]
args = ["bench", "--package", "surrealdb", "--no-default-features", "--features", "kv-mem,http,scripting,jwks,sql2", "--", "${@}"]
# Run
[tasks.run]

View file

@ -10,7 +10,7 @@ reduce_output = true
default_to_workspace = false
[env]
DEV_FEATURES={ value = "storage-mem,scripting,http,ml,jwks", condition = { env_not_set = ["DEV_FEATURES"] } }
DEV_FEATURES={ value = "storage-mem,scripting,http,ml,jwks,sql2", condition = { env_not_set = ["DEV_FEATURES"] } }
SURREAL_LOG={ value = "trace", condition = { env_not_set = ["SURREAL_LOG"] } }
SURREAL_USER={ value = "root", condition = { env_not_set = ["SURREAL_USER"] } }
SURREAL_PASS={ value = "root", condition = { env_not_set = ["SURREAL_PASS"] } }

View file

@ -2,7 +2,7 @@
name = "surrealdb-core"
publish = true
edition = "2021"
version = "1.4.0"
version = "2.0.0-alpha.4.0"
rust-version = "1.70.0"
readme = "../lib/CARGO.md"
authors = ["Tobie Morgan Hitchcock <tobie@surrealdb.com>"]

View file

@ -93,9 +93,9 @@ pub(crate) struct LqEntry {
/// For example, live query IDs need to be tracked by websockets so they are closed correctly on closing a connection
#[derive(Debug)]
#[cfg_attr(test, derive(PartialEq, Clone))]
#[allow(dead_code)]
pub(crate) enum TrackedResult {
LiveQuery(LqEntry),
#[allow(dead_code)]
KillQuery(KillEntry),
}

View file

@ -95,6 +95,10 @@ pub fn escape_rid(s: &str) -> Cow<'_, str> {
#[inline]
/// Escapes an ident if necessary
pub fn escape_ident(s: &str) -> Cow<'_, str> {
#[cfg(feature = "experimental-parser")]
if let Some(x) = escape_reserved_keyword(s) {
return Cow::Owned(x);
}
escape_numeric(s, BACKTICK, BACKTICK, BACKTICK_ESC)
}
@ -136,6 +140,11 @@ pub fn escape_numeric<'a>(s: &'a str, l: char, r: char, e: &str) -> Cow<'a, str>
}
}
#[cfg(feature = "experimental-parser")]
pub fn escape_reserved_keyword(s: &str) -> Option<String> {
crate::syn::v2::could_be_reserved_keyword(s).then(|| format!("`{}`", s))
}
#[cfg(feature = "experimental-parser")]
#[inline]
pub fn escape_numeric<'a>(s: &'a str, l: char, r: char, e: &str) -> Cow<'a, str> {

View file

@ -114,6 +114,6 @@ impl Param {
impl fmt::Display for Param {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "${}", &self.0)
write!(f, "${}", &self.0 .0)
}
}

View file

@ -324,7 +324,6 @@ fn statements() -> Vec<Statement> {
dimension: 4,
_distance: Default::default(),
distance: Distance::Minkowski(Number::Int(5)),
_distance: Default::default(),
capacity: 6,
doc_ids_order: 7,
doc_ids_cache: 8,

View file

@ -135,7 +135,7 @@ license-files = []
[[licenses.clarify]]
name = "surrealdb-core"
expression = "BUSL-1.1"
license-files = [{ path = "../LICENSE", hash = 0x08ad5bad }]
license-files = []
[[licenses.clarify]]
name = "surrealml-core"

View file

@ -26,22 +26,22 @@ resolver = "2"
default = ["protocol-ws", "rustls"]
protocol-http = ["dep:reqwest", "dep:tokio-util"]
protocol-ws = ["dep:tokio-tungstenite", "dep:trice", "tokio/time"]
kv-mem = ["surrealdb-core/kv-mem", "tokio/time"]
kv-indxdb = ["surrealdb-core/kv-indxdb"]
kv-speedb = ["surrealdb-core/kv-speedb", "tokio/time"]
kv-rocksdb = ["surrealdb-core/kv-rocksdb", "tokio/time"]
kv-tikv = ["surrealdb-core/kv-tikv"]
kv-fdb-5_1 = ["surrealdb-core/kv-fdb-5_1", "kv-fdb"]
kv-fdb-5_2 = ["surrealdb-core/kv-fdb-5_2", "kv-fdb"]
kv-fdb-6_0 = ["surrealdb-core/kv-fdb-6_0", "kv-fdb"]
kv-fdb-6_1 = ["surrealdb-core/kv-fdb-6_1", "kv-fdb"]
kv-fdb-6_2 = ["surrealdb-core/kv-fdb-6_2", "kv-fdb"]
kv-fdb-6_3 = ["surrealdb-core/kv-fdb-6_3", "kv-fdb"]
kv-fdb-7_0 = ["surrealdb-core/kv-fdb-7_0", "kv-fdb"]
kv-fdb-7_1 = ["surrealdb-core/kv-fdb-7_1", "kv-fdb"]
kv-surrealkv = ["surrealdb-core/kv-surrealkv", "tokio/time"]
scripting = ["surrealdb-core/scripting"]
http = ["surrealdb-core/http"]
kv-mem = ["surrealdb-core1/kv-mem", "surrealdb-core2/kv-mem", "tokio/time"]
kv-indxdb = ["surrealdb-core1/kv-indxdb", "surrealdb-core2/kv-indxdb"]
kv-speedb = ["surrealdb-core1/kv-speedb", "surrealdb-core2/kv-speedb", "tokio/time"]
kv-rocksdb = ["surrealdb-core1/kv-rocksdb", "surrealdb-core2/kv-rocksdb", "tokio/time"]
kv-tikv = ["surrealdb-core1/kv-tikv", "surrealdb-core2/kv-tikv"]
kv-fdb-5_1 = ["surrealdb-core1/kv-fdb-5_1", "surrealdb-core2/kv-fdb-5_1", "kv-fdb"]
kv-fdb-5_2 = ["surrealdb-core1/kv-fdb-5_2", "surrealdb-core2/kv-fdb-5_2", "kv-fdb"]
kv-fdb-6_0 = ["surrealdb-core1/kv-fdb-6_0", "surrealdb-core2/kv-fdb-6_0", "kv-fdb"]
kv-fdb-6_1 = ["surrealdb-core1/kv-fdb-6_1", "surrealdb-core2/kv-fdb-6_1", "kv-fdb"]
kv-fdb-6_2 = ["surrealdb-core1/kv-fdb-6_2", "surrealdb-core2/kv-fdb-6_2", "kv-fdb"]
kv-fdb-6_3 = ["surrealdb-core1/kv-fdb-6_3", "surrealdb-core2/kv-fdb-6_3", "kv-fdb"]
kv-fdb-7_0 = ["surrealdb-core1/kv-fdb-7_0", "surrealdb-core2/kv-fdb-7_0", "kv-fdb"]
kv-fdb-7_1 = ["surrealdb-core1/kv-fdb-7_1", "surrealdb-core2/kv-fdb-7_1", "kv-fdb"]
kv-surrealkv = ["surrealdb-core1/kv-surrealkv", "surrealdb-core2/kv-surrealkv", "tokio/time"]
scripting = ["surrealdb-core1/scripting", "surrealdb-core2/scripting"]
http = ["surrealdb-core1/http", "surrealdb-core2/http"]
native-tls = [
"dep:native-tls",
"reqwest?/native-tls",
@ -52,11 +52,11 @@ rustls = [
"reqwest?/rustls-tls",
"tokio-tungstenite?/rustls-tls-webpki-roots",
]
ml = ["surrealdb-core/ml"]
jwks = ["surrealdb-core/jwks"]
arbitrary = ["surrealdb-core/arbitrary"]
sql2 = ["surrealdb-core/sql2"]
parser2 = ["surrealdb-core/experimental-parser"]
ml = ["surrealdb-core1/ml", "surrealdb-core2/ml"]
jwks = ["surrealdb-core2/jwks", "sql2"]
arbitrary = ["surrealdb-core1/arbitrary", "surrealdb-core2/arbitrary"]
sql2 = ["dep:surrealdb-core2"]
parser2 = ["surrealdb-core1/experimental-parser", "surrealdb-core2/experimental-parser"]
# Private features
kv-fdb = ["tokio/time"]
@ -98,7 +98,8 @@ rustls = { version = "0.21.10", optional = true }
semver = { version = "1.0.20", features = ["serde"] }
serde = { version = "1.0.193", features = ["derive"] }
serde_json = "1.0.108"
surrealdb-core = { version = "1", default-features = false, path = "../core", package = "surrealdb-core" }
surrealdb-core1 = { version = "1", default-features = false, package = "surrealdb-core" }
surrealdb-core2 = { version = "=2.0.0-alpha.4.0", default-features = false, features = ["sql2"], path = "../core", package = "surrealdb-core", optional = true }
thiserror = "1.0.50"
tokio-util = { version = "0.7.10", optional = true, features = ["compat"] }
tracing = "0.1.40"

View file

@ -5,7 +5,7 @@ use std::collections::{BTreeMap, HashMap};
use std::hash::Hash;
use std::time::Duration;
use surrealdb::key::table::ix;
use surrealdb_core::sql::{value, Array, Id, Thing};
use surrealdb::sql::{value, Array, Id, Thing};
// Common use case: VectorSearch
fn bench_hash_trie_btree_large_vector(c: &mut Criterion) {

View file

@ -11,6 +11,7 @@ use crate::api::ExtraFeatures;
use crate::api::OnceLockExt;
use crate::api::Result;
use crate::api::Surreal;
use crate::dbs::Options;
use crate::dbs::Session;
use crate::engine::IntervalStream;
use crate::fflags::FFLAGS;
@ -35,7 +36,6 @@ use std::sync::Arc;
use std::sync::OnceLock;
use std::task::Poll;
use std::time::Duration;
use surrealdb_core::dbs::Options;
use tokio::sync::watch;
use tokio::time;
use tokio::time::MissedTickBehavior;

View file

@ -11,6 +11,7 @@ use crate::api::ExtraFeatures;
use crate::api::OnceLockExt;
use crate::api::Result;
use crate::api::Surreal;
use crate::dbs::Options;
use crate::dbs::Session;
use crate::engine::IntervalStream;
use crate::fflags::FFLAGS;
@ -35,7 +36,6 @@ use std::sync::Arc;
use std::sync::OnceLock;
use std::task::Poll;
use std::time::Duration;
use surrealdb_core::dbs::Options;
use tokio::sync::watch;
use wasm_bindgen_futures::spawn_local;
use wasmtimer::tokio as time;

View file

@ -148,8 +148,12 @@ pub use api::Result;
#[doc(inline)]
pub use api::Surreal;
#[cfg(not(feature = "sql2"))]
#[doc(inline)]
pub use surrealdb_core::*;
pub use surrealdb_core1::*;
#[cfg(feature = "sql2")]
#[doc(inline)]
pub use surrealdb_core2::*;
use uuid::Uuid;

View file

@ -1,6 +1,6 @@
// Tests common to all protocols and storage engines
use surrealdb_core::fflags::FFLAGS;
use surrealdb::fflags::FFLAGS;
static PERMITS: Semaphore = Semaphore::const_new(1);

View file

@ -4,11 +4,11 @@ use helpers::new_ds;
use parse::Parse;
use surrealdb::dbs::Session;
use surrealdb::err::Error;
use surrealdb::fflags::FFLAGS;
use surrealdb::kvs::Datastore;
use surrealdb::kvs::LockType::Optimistic;
use surrealdb::kvs::TransactionType::Write;
use surrealdb::sql::Value;
use surrealdb_core::fflags::FFLAGS;
use surrealdb_core::kvs::Datastore;
use surrealdb_core::kvs::LockType::Optimistic;
use surrealdb_core::kvs::TransactionType::Write;
mod helpers;
mod parse;
@ -178,6 +178,7 @@ async fn database_change_feeds() -> Result<(), Error> {
current_time += 1;
dbs.tick_at(current_time).await?;
let mut tx = dbs.transaction(Write, Optimistic).await?;
#[cfg(feature = "sql2")]
tx.print_all().await;
tx.cancel().await?;

View file

@ -4,7 +4,7 @@ mod helpers;
use helpers::new_ds;
use surrealdb::dbs::Session;
use surrealdb::err::Error;
use surrealdb_core::sql::{self, Number, Value};
use surrealdb::sql::{self, Number, Value};
async fn test_queries(sql: &str, desired_responses: &[&str]) -> Result<(), Error> {
let db = new_ds().await?;

View file

@ -4,8 +4,8 @@ mod parse;
use helpers::new_ds;
use surrealdb::dbs::Session;
use surrealdb::err::Error;
use surrealdb::fflags::FFLAGS;
use surrealdb::sql::Value;
use surrealdb_core::fflags::FFLAGS;
#[tokio::test]
async fn live_query_sends_registered_lq_details() -> Result<(), Error> {

View file

@ -7,8 +7,8 @@ use helpers::new_ds;
use rust_decimal::Decimal;
use surrealdb::dbs::Session;
use surrealdb::err::Error;
use surrealdb::sql::Number;
use surrealdb::sql::Value;
use surrealdb_core::sql::Number;
#[tokio::test]
async fn script_function_error() -> Result<(), Error> {