Skip to content

Commit

Permalink
changed env: sql parser to query parser
Browse files Browse the repository at this point in the history
  • Loading branch information
miguel-lansdorf committed Sep 21, 2023
1 parent 30c3a58 commit 82a0c30
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion api/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ SERVER_PORT=31200
CORS_ALLOW_ORIGIN=
SECRET_KEY="secret key for encrypting datasource passwords"
ENABLE_AUTH=0
ENABLE_SQL_PARSER=0
ENABLE_QUERY_PARSER=0
SUPER_ADMIN_PASSWORD=
DATABASE_CONNECTION_TIMEOUT_MS=
DATABASE_POOL_SIZE=
Expand Down
2 changes: 1 addition & 1 deletion api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Add a `.env` file based on `.env.sample`
- `CORS_ALLOW_ORIGIN` for configuring cors. separate multiple origins by `;`. Defaults to `http://localhost`
- `SECRET_KEY` for encrypting and decrypting passwords used in datasource configurations
- `ENABLE_AUTH` Whether to add authentication and authorization to routes. 0 = disabled, 1 = enabled
- `ENABLE_SQL_PARSER` Whether to enable Server-Side SQL parsing. 0 = disabled, 1 = enabled
- `ENABLE_QUERY_PARSER` Whether to enable Server-Side Query parsing. 0 = disabled, 1 = enabled
- `SUPER_ADMIN_PASSWORD` The password which will be configured for the superadmin account during migration. Must be configured before migration is run. If value is not set, password will be 'secret'
- `DATABASE_CONNECTION_TIMEOUT_MS` for configuration the time after which the db connection will timeout in milliseconds. Default is 30000ms (30 seconds)
- `DATABASE_POOL_SIZE` for configuration the maximum number of clients in the pool
Expand Down
2 changes: 1 addition & 1 deletion api/src/utils/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ export const DATABASE_CONNECTION_TIMEOUT_MS = parseInt(process.env.DATABASE_CONN
export const DATABASE_POOL_SIZE = parseInt(process.env.DATABASE_POOL_SIZE ?? '10');
export const DEFAULT_LANGUAGE = 'en';
export const FS_CACHE_RETAIN_TIME = '86400';
export const QUERY_PARSING_ENABLED = process.env.ENABLE_SQL_PARSER === '1';
export const QUERY_PARSING_ENABLED = process.env.ENABLE_QUERY_PARSER === '1';
2 changes: 1 addition & 1 deletion api/tests/e2e/jest.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = async (globalConfig) => {
process.env.WEBSITE_LOGO_URL_EN = 'WEBSITE_LOGO_URL_EN';
process.env.WEBSITE_LOGO_JUMP_URL = '/WEBSITE_LOGO_JUMP_URL';
process.env.WEBSITE_FAVICON_URL = '/WEBSITE_FAVICON_URL';
process.env.ENABLE_SQL_PARSER = '1';
process.env.ENABLE_QUERY_PARSER = '1';

dashboardDataSource.setOptions({ url: process.env.END_2_END_TEST_PG_URL! });

Expand Down
2 changes: 1 addition & 1 deletion api/tests/integration/jest.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = async (globalConfig) => {
process.env.WEBSITE_LOGO_URL_EN = 'WEBSITE_LOGO_URL_EN';
process.env.WEBSITE_LOGO_JUMP_URL = '/WEBSITE_LOGO_JUMP_URL';
process.env.WEBSITE_FAVICON_URL = '/WEBSITE_FAVICON_URL';
process.env.ENABLE_SQL_PARSER = '1';
process.env.ENABLE_QUERY_PARSER = '1';

dashboardDataSource.setOptions({ url: process.env.INTEGRATION_TEST_PG_URL! });

Expand Down

0 comments on commit 82a0c30

Please sign in to comment.