forked from prisma/prisma-engines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.envrc
52 lines (44 loc) · 1.94 KB
/
.envrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
### General env vars ###
export WORKSPACE_ROOT=$(pwd)
export RUST_LOG_FORMAT=devel # QE specific
export RUST_LOG=info
### Various query engine local dev env vars ###
export PRISMA_DML_PATH=$(pwd)/dev_datamodel.prisma
export PRISMA2_BINARY_PATH="/usr/local/lib/node_modules/prisma2/"
export PRISMA_BINARY_PATH=$(pwd)/target/release/query-engine
export PRISMA_ENGINE_PROTOCOL="graphql"
### QE config vars, set to testing values ###
export SQLITE_MAX_VARIABLE_NUMBER=250000 # This must be in sync with the setting in the engineer build CLI
export QUERY_BATCH_SIZE=10 # Max size of IN statement vars.
### QE test setup vars ###
export LOG_LEVEL=trace
export SIMPLE_TEST_MODE="yes" # Reduces the amount of generated `relation_link_test` tests. Remove the export entirely to disable it.
### QE specific logging vars ###
export QE_LOG_LEVEL=debug # Set it to "trace" to enable query-graph debugging logs
# export PRISMA_RENDER_DOT_FILE=1 # Uncomment to enable rendering a dot file of the Query Graph from an executed query.
# export FMT_SQL=1 # Uncomment it to enable logging formatted SQL queries
# Mongo image requires additional wait time on arm arch for some reason.
if uname -a | grep -q 'arm64'; then
export INIT_WAIT_SEC="10"
else
export INIT_WAIT_SEC="2"
fi
# (Example env vars if you're not using the make commands, i.e. the config files, to set up query engine tests)
# export TEST_RUNNER="direct"
# export TEST_CONNECTOR="postgres"
# export TEST_CONNECTOR_VERSION="10"
# Set up env vars and build inputs from flake.nix automatically for nix users.
# If you don't use nix, you can safely ignore this.
if command -v nix &> /dev/null
then
if nix flake metadata > /dev/null; then
if type nix_direnv_watch_file &> /dev/null; then
nix_direnv_watch_file nix/shell.nix nix/all-engines.nix nix/args.nix
fi
use flake
fi
fi
# Source the gitignored .envrc.local if it exists.
if test -f .envrc.local; then
source .envrc.local
fi