Skip to content

Commit

Permalink
rename internal options
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-Webster committed Nov 15, 2024
1 parent 102d767 commit bb4db7c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,23 +211,23 @@ The internal queries that are ran before the queries in ```initSQLString``` are

The following options are only meant for internal debugging use. Their behaviour may change or they may get removed between major/minor/patch versions and they are not to be considered stable. The options below will not follow Semantic Versioning so it is advised to not use them.

- `deleteDBAfterStopped: boolean`
- `_DO_NOT_USE_deleteDBAfterStopped: boolean`

Required: No

Default: true

Description: Changes whether or not the database will be deleted after it has been stopped. If set to `true`, the database WILL be deleted after it has been stopped.

- `dataPath: string`
- `_DO_NOT_USE_dbPath: string`

Required: No

Default: `TMPDIR/mysqlmsn/dbs/UUID` (replacing TMPDIR with the OS temp directory and UUID with a UUIDv4 without seperating dashes).

Description: The folder to store database-related data in

- `binaryDirectoryPath: string`
- `_DO_NOT_USE_binaryDirectoryPath: string`

Required: No

Expand Down
6 changes: 3 additions & 3 deletions tests/versions.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ for (const version of versions) {
dbName: 'testingdata',
username: username,
logLevel: 'LOG',
deleteDBAfterStopped: !process.env.useCIDBPath,
_DO_NOT_USE_deleteDBAfterStopped: !process.env.useCIDBPath,
ignoreUnsupportedSystemVersion: true,
initSQLString: 'CREATE DATABASE mytestdb;'
}

if (process.env.useCIDBPath) {
options.dbPath = `${dbPath}/${randomUUID()}`
options.binaryDirectoryPath = binaryPath
options._DO_NOT_USE_dbPath = `${dbPath}/${randomUUID()}`
options._DO_NOT_USE_binaryDirectoryPath = binaryPath
}

const db = await createDB(options)
Expand Down
6 changes: 3 additions & 3 deletions types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ export type ServerOptions = {
lockRetries?: number | undefined,
lockRetryWait?: number | undefined,
username?: string | undefined,
deleteDBAfterStopped?: boolean | undefined,
dbPath?: string | undefined,
ignoreUnsupportedSystemVersion?: boolean | undefined,
port?: number | undefined,
xPort?: number | undefined,
binaryDirectoryPath?: string | undefined,
downloadRetries?: number | undefined,
initSQLString?: string | undefined
_DO_NOT_USE_deleteDBAfterStopped?: boolean | undefined,
_DO_NOT_USE_dbPath?: string | undefined,
_DO_NOT_USE_binaryDirectoryPath?: string | undefined
}

export type InternalServerOptions = {
Expand Down

0 comments on commit bb4db7c

Please sign in to comment.