Skip to content
Snippets Groups Projects
Verified Commit a0d4f8a8 authored by Georgy Moshkin's avatar Georgy Moshkin :speech_balloon: Committed by Denis Smirnov
Browse files

fix: support tarantool-module v3.0.0

parent d1955932
No related branches found
No related tags found
1 merge request!1414sbroad import
......@@ -158,10 +158,49 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c"
dependencies = [
"bitflags",
"textwrap",
"textwrap 0.11.0",
"unicode-width",
]
[[package]]
name = "clap"
version = "3.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123"
dependencies = [
"atty",
"bitflags",
"clap_derive",
"clap_lex",
"indexmap",
"once_cell",
"strsim",
"termcolor",
"textwrap 0.16.0",
]
[[package]]
name = "clap_derive"
version = "3.2.25"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae6371b8bdc8b7d3959e9cf7b22d4435ef3e79e138688421ec654acf8c81b008"
dependencies = [
"heck",
"proc-macro-error",
"proc-macro2 1.0.63",
"quote 1.0.29",
"syn 1.0.109",
]
[[package]]
name = "clap_lex"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5"
dependencies = [
"os_str_bytes",
]
[[package]]
name = "constant_time_eq"
version = "0.2.6"
......@@ -185,7 +224,7 @@ checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f"
dependencies = [
"atty",
"cast",
"clap",
"clap 2.34.0",
"criterion-plot",
"csv",
"itertools",
......@@ -555,6 +594,12 @@ version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
[[package]]
name = "heck"
version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
[[package]]
name = "hermit-abi"
version = "0.1.19"
......@@ -795,6 +840,12 @@ dependencies = [
"num-traits",
]
[[package]]
name = "os_str_bytes"
version = "6.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d5d9eb14b174ee9aa2ef96dc2b94637a2d4b6e7cb873c7e171f0c20c6cf3eac"
[[package]]
name = "output_vt100"
version = "0.1.3"
......@@ -938,6 +989,30 @@ dependencies = [
"yansi",
]
[[package]]
name = "proc-macro-error"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c"
dependencies = [
"proc-macro-error-attr",
"proc-macro2 1.0.63",
"quote 1.0.29",
"syn 1.0.109",
"version_check",
]
[[package]]
name = "proc-macro-error-attr"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869"
dependencies = [
"proc-macro2 1.0.63",
"quote 1.0.29",
"version_check",
]
[[package]]
name = "proc-macro2"
version = "0.4.30"
......@@ -1339,13 +1414,14 @@ dependencies = [
[[package]]
name = "tarantool"
version = "2.0.0"
source = "git+https://git.picodata.io/picodata/picodata/tarantool-module.git#6872b6dc986b7f7d4718e2e7cc1717a5b0a5842c"
version = "3.0.0"
source = "git+https://git.picodata.io/picodata/picodata/tarantool-module.git#d1043f4ad27c271b2d49489356f6447d5771ad1c"
dependencies = [
"async-trait",
"base64",
"bitflags",
"byteorder",
"clap 3.2.25",
"crossbeam-queue",
"dec",
"dlopen",
......@@ -1375,15 +1451,25 @@ dependencies = [
[[package]]
name = "tarantool-proc"
version = "0.2.1"
source = "git+https://git.picodata.io/picodata/picodata/tarantool-module.git#6872b6dc986b7f7d4718e2e7cc1717a5b0a5842c"
version = "0.2.2"
source = "git+https://git.picodata.io/picodata/picodata/tarantool-module.git#d1043f4ad27c271b2d49489356f6447d5771ad1c"
dependencies = [
"darling",
"proc-macro-error",
"proc-macro2 1.0.63",
"quote 1.0.29",
"syn 1.0.109",
]
[[package]]
name = "termcolor"
version = "1.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6093bad37da69aab9d123a8091e4be0aa4a03e4d601ec641c327398315f62b64"
dependencies = [
"winapi-util",
]
[[package]]
name = "textwrap"
version = "0.11.0"
......@@ -1393,6 +1479,12 @@ dependencies = [
"unicode-width",
]
[[package]]
name = "textwrap"
version = "0.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "222a222a5bfe1bba4a77b45ec488a741b3cb8872e5e499451fd7d0129c9c7c3d"
[[package]]
name = "thiserror"
version = "1.0.41"
......@@ -1463,8 +1555,8 @@ dependencies = [
[[package]]
name = "tlua"
version = "1.0.0"
source = "git+https://git.picodata.io/picodata/picodata/tarantool-module.git#6872b6dc986b7f7d4718e2e7cc1717a5b0a5842c"
version = "2.0.0"
source = "git+https://git.picodata.io/picodata/picodata/tarantool-module.git#d1043f4ad27c271b2d49489356f6447d5771ad1c"
dependencies = [
"libc",
"serde",
......@@ -1475,7 +1567,7 @@ dependencies = [
[[package]]
name = "tlua-derive"
version = "0.2.0"
source = "git+https://git.picodata.io/picodata/picodata/tarantool-module.git#6872b6dc986b7f7d4718e2e7cc1717a5b0a5842c"
source = "git+https://git.picodata.io/picodata/picodata/tarantool-module.git#d1043f4ad27c271b2d49489356f6447d5771ad1c"
dependencies = [
"proc-macro2 1.0.63",
"quote 1.0.29",
......
......@@ -212,9 +212,9 @@ g.test_query_errored = function()
}
local _, err = api:call("sbroad.execute", { [[SELECT * FROM "testing_space" where "id" = ?]], {invalid_type_param} })
t.assert_equals(
tostring(err), "Sbroad Error: pattern with parameters parsing error: " ..
[[Decode(Syntax("data did not match any variant of untagged enum LuaValue"))]]
t.assert_str_contains(
tostring(err),
"Sbroad Error: pattern with parameters parsing error"
)
-- check err when params lenght is less then amount of sign `?`
......
......@@ -10,7 +10,7 @@ mod prod_imports {
pub use crate::ir::relation::Column;
pub use crate::ir::value::{EncodedValue, Value};
pub use tarantool::index::{FieldType, IndexOptions, IndexType, Part};
pub use tarantool::space::{Field, Space, SpaceCreateOptions};
pub use tarantool::space::{Field, Space, SpaceCreateOptions, SpaceType};
pub use tarantool::tuple::Tuple;
}
......@@ -51,17 +51,15 @@ impl TmpSpace {
fields.push(Field::unsigned(pk_name.clone()));
let fields_len = fields.len() as u32;
// Vinyl engine does not support temporary spaces.
let is_temporary = match engine {
SpaceEngine::Memtx => true,
SpaceEngine::Vinyl => false,
let space_type = match engine {
SpaceEngine::Memtx => SpaceType::DataTemporary,
SpaceEngine::Vinyl => SpaceType::Normal,
};
let options = SpaceCreateOptions {
format: Some(fields),
engine: engine.into(),
is_local: false,
is_temporary,
space_type,
if_not_exists: false,
is_sync: false,
..Default::default()
};
......
......@@ -28,7 +28,7 @@ use space::Field;
use std::borrow::Cow;
use std::cell::RefCell;
use tarantool::index::{FieldType, IndexOptions, IndexType, IteratorType};
use tarantool::space::{Space, SpaceCreateOptions, SpaceEngineType};
use tarantool::space::{Space, SpaceCreateOptions, SpaceEngineType, SpaceType};
use tarantool::{index, space};
use crate::{debug, warn};
......@@ -328,8 +328,7 @@ impl TarantoolSpace for QuerySpace {
Field::unsigned("REF_COUNTER"),
]),
engine: SpaceEngineType::Memtx,
is_temporary: true,
is_local: false,
space_type: SpaceType::DataTemporary,
if_not_exists: true,
..Default::default()
};
......@@ -414,8 +413,7 @@ impl TarantoolSpace for StatSpace {
Field::unsigned("COUNT"),
]),
engine: SpaceEngineType::Memtx,
is_temporary: true,
is_local: false,
space_type: SpaceType::DataTemporary,
if_not_exists: true,
..Default::default()
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment