forked from prisma/prisma-engines
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.envrc
58 lines (49 loc) · 2.46 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
53
54
55
56
57
58
### 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
### 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
### Uncomment to run driver adapters tests. See query-engine-driver-adapters.yml workflow for how tests run in CI.
# export EXTERNAL_TEST_EXECUTOR="napi"
# export DRIVER_ADAPTER=pg # Set to pg, neon, planetscale, libsql or cfd1
# export PRISMA_DISABLE_QUAINT_EXECUTORS=1 # Disable quaint executors for driver adapters
# export DRIVER_ADAPTER_URL_OVERRIDE ="postgres://USER:PASSWORD@DATABASExxxx" # Override the database url for the driver adapter tests
# 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
# Source the gitignored .envrc.local if it exists.
if test -f .envrc.local; then
watch_file .envrc.local
source .envrc.local
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.
# You can set the DISABLE_NIX environment variable if you're in an environment
# where nix is pre-installed (e.g. gitpod) but you don't want to use it.
if command -v nix &> /dev/null && [ -z ${DISABLE_NIX+x} ]
then
if nix flake metadata > /dev/null; then
watch_file nix/shell.nix nix/all-engines.nix nix/args.nix
use flake
fi
fi