[package]
name = "cubesqlplanner"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
tokio = { version = "^1.35", features = ["full", "rt", "tracing"] }
itertools = "0.10.2"
cubeclient = { path = "../../../cubesql/cubeclient" }
nativebridge = { path = "../nativebridge/" }
async-trait = "0.1.36"
serde = "1.0.115"
serde_json = "1.0.56"
cubenativeutils = { path = "../../cubenativeutils/" }
minijinja = { version = "1", features = ["json", "loader"] }
convert_case = "0.7.1"
chrono = "0.4.15"
chrono-tz = "0.8.2"
lazy_static = "1.4.0"
regex = "1.3.9"
typed-builder = "0.21.2"
indoc = "2.0.7"
indexmap = "2.12"


[features]
integration-postgres = []
# Runs queries over external pre-aggregations against a locally built
# cubestored binary (CUBESTORED_BIN_PATH or rust/cubestore/target/*).
integration-cubestore = ["integration-postgres"]

[dev-dependencies]
petgraph = "0.6"
serde_yaml = "0.9"
insta = "1.34"
testcontainers = "0.23"
testcontainers-modules = { version = "0.11", features = ["postgres"] }
tokio-postgres = "0.7"
mysql_async = { version = "0.34", default-features = false, features = ["minimal"] }

[dependencies.neon]
version = "=1"
default-features = false
features = ["napi-1", "napi-4", "napi-6", "futures"]

# Code in cubesqlplanner workspace is not ready for full-blown clippy
# So we disable some rules to enable per-rule latch in CI, not for a whole clippy run
# Feel free to remove any rule from here and fix all warnings with it
# Or to write a comment why rule should stay disabled
[lints.clippy]
clone_on_copy = "allow"
collapsible_else_if = "allow"
default_constructed_unit_structs = "allow"
enum_variant_names = "allow"
filter-map-identity = "allow"
let_and_return = "allow"
map_clone = "allow"
manual_map = "allow"
manual_unwrap_or_default = "allow"
match_like_matches_macro = "allow"
needless-bool = "allow"
needless_borrow = "allow"
needless_question_mark = "allow"
neg_multiply = "allow"
new_without_default = "allow"
only_used_in_recursion = "allow"
ptr_arg = "allow"
redundant_closure = "allow"
result_large_err = "allow"
should_implement_trait = "allow"
to_string_in_format_args = "allow"
too-many-arguments = "allow"
useless_conversion = "allow"
useless_format = "allow"
vec_init_then_push = "allow"
type_complexity = "allow"
if_same_then_else = "allow"
to_string_trait_impl = "allow"
field_reassign_with_default = "allow"
collapsible_match = "allow"
wrong_self_convention = "allow"
module_inception = "allow"
comparison_chain = "allow"
