Support environment variables and special variables (like $__TEST_DIR__) substitution with the crate subst. Basically, this is a general form of the previous replace_keywords.
This is helpful if we want to don't want to hardcode some information in the SQL, for example, authentication information.
control substitution on
query T
select $MY_USERNAME, ${MY_PASSWORD}, ${MY_INEXISTENT_PORT:11451}, ${MY_DATABASE:$MY_USERNAME-db}
----
sqllogictest, rust, 11451, sqllogictest-db
query T
select $__TEST_DIR__
----
/var/folders/h3/ky82klmd2ygfr58ppqm4js6m0000gn/T/.tmp63ZLdk
See substitution/basic.slt for more detailed usages.
In order to be compatible with other implementations, this feature is under the gate of control substitution and is by default disabled.
Support environment variables and special variables (like
$__TEST_DIR__
) substitution with the cratesubst
. Basically, this is a general form of the previousreplace_keywords
.This is helpful if we want to don't want to hardcode some information in the SQL, for example, authentication information.
See
substitution/basic.slt
for more detailed usages.In order to be compatible with other implementations, this feature is under the gate of
control substitution
and is by default disabled.