Skip to content

Commit

Permalink
expose socket on database creation
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian-Webster committed Nov 16, 2024
1 parent 72bfa67 commit 228f4ff
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,10 @@ The port that MySQLX is listening on
The database that was created on database initialization
- `username: string`
The name of the user to use to login to the database
- `socket: string`
If on Windows, this is the name of the named pipe that MySQL is listening on. If not on Windows, this is the path to the socket that MySQL is listening on.
- `xSocket: string`
If on Windows, this is the name of the named pipe that the MySQL X Plugin is listening on. If not on Windows, this is the path that the MySQL X Plugin is listening on.
- `stop: () => Promise<void>`
The method to stop the database. The returned promise resolves when the database has successfully stopped.

Expand Down
2 changes: 2 additions & 0 deletions src/libraries/Executor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,8 @@ class Executor {
resolve({
port,
xPort: mySQLXPort,
socket,
xSocket,
dbName: options.dbName,
username: options.username,
stop: () => {
Expand Down
2 changes: 2 additions & 0 deletions types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ export type ExecuteFileReturn = {
export type MySQLDB = {
port: number,
xPort: number,
socket: string,
xSocket: string,
dbName: string,
username: string,
stop: () => Promise<void>
Expand Down

0 comments on commit 228f4ff

Please sign in to comment.