File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed
packages/dialect-tauri/src Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -17,9 +17,8 @@ export class TaruiSqlDriver<T extends 'sqlite' | 'mysql' | 'postgres'> {
17
17
? await this . config . database ( `${ this . config . type } :${ this . config . type === 'sqlite' ? '' : '//' } ` as any )
18
18
: await this . config . database
19
19
this . connection = new TauriSqlConnection ( this . db )
20
- if ( this . config . onCreateConnection ) {
21
- await this . config . onCreateConnection ( this . connection )
22
- }
20
+
21
+ await this . config . onCreateConnection ?.( this . connection )
23
22
}
24
23
25
24
async acquireConnection ( ) : Promise < DatabaseConnection > {
Original file line number Diff line number Diff line change @@ -43,10 +43,7 @@ export class TauriSqlDialect<T extends 'sqlite' | 'mysql' | 'postgres'> {
43
43
* support MySQL, PostgreSQL and SQLite
44
44
*/
45
45
constructor ( config : TauriSqlDialectConfig < T > ) {
46
- this . #config = {
47
- ...config ,
48
- type : config . type ?? 'sqlite' ,
49
- }
46
+ this . #config = config
50
47
}
51
48
52
49
createDriver ( ) : Driver {
You can’t perform that action at this time.
0 commit comments