|
1 | | -import{DriverPackageNotInstalledError}from"../../error/DriverPackageNotInstalledError"; |
2 | | -import{SqliteQueryRunner}from"./SqliteQueryRunner"; |
3 | | -import{DriverOptionNotSetError}from"../../error/DriverOptionNotSetError"; |
4 | | -import{PlatformTools}from"../../platform/PlatformTools"; |
5 | | -import{Connection}from"../../connection/Connection"; |
6 | | -import{SqliteConnectionOptions}from"./SqliteConnectionOptions"; |
7 | | -import{ColumnType}from"../types/ColumnTypes"; |
8 | | -import{QueryRunner}from"../../query-runner/QueryRunner"; |
9 | | -import{AbstractSqliteDriver}from"../sqlite-abstract/AbstractSqliteDriver"; |
| 1 | +import{DriverPackageNotInstalledError}from"../../error/DriverPackageNotInstalledError"; |
| 2 | +import{SqliteQueryRunner}from"./SqliteQueryRunner"; |
| 3 | +import{DriverOptionNotSetError}from"../../error/DriverOptionNotSetError"; |
| 4 | +import{PlatformTools}from"../../platform/PlatformTools"; |
| 5 | +import{Connection}from"../../connection/Connection"; |
| 6 | +import{SqliteConnectionOptions}from"./SqliteConnectionOptions"; |
| 7 | +import{ColumnType}from"../types/ColumnTypes"; |
| 8 | +import{QueryRunner}from"../../query-runner/QueryRunner"; |
| 9 | +import{AbstractSqliteDriver}from"../sqlite-abstract/AbstractSqliteDriver"; |
10 | 10 |
|
11 | 11 | /** |
12 | 12 | * Organizes communication with sqlite DBMS. |
@@ -63,14 +63,14 @@ export class SqliteDriver extends AbstractSqliteDriver { |
63 | 63 | /** |
64 | 64 | * Creates a query runner used to execute database queries. |
65 | 65 | */ |
66 | | -createQueryRunner(mode: "master"|"slave"="master"): QueryRunner{ |
| 66 | +createQueryRunner(mode: "master"|"slave"="master"): QueryRunner{ |
67 | 67 | if(!this.queryRunner) |
68 | 68 | this.queryRunner=newSqliteQueryRunner(this); |
69 | 69 |
|
70 | 70 | returnthis.queryRunner; |
71 | 71 | } |
72 | 72 |
|
73 | | -normalizeType(column: {type?: ColumnType,length?: number|string,precision?: number|null,scale?: number}): string{ |
| 73 | +normalizeType(column: {type?: ColumnType,length?: number|string,precision?: number|null,scale?: number}): string{ |
74 | 74 | if((column.typeasany)===Buffer){ |
75 | 75 | return"blob"; |
76 | 76 | } |
@@ -133,11 +133,9 @@ export class SqliteDriver extends AbstractSqliteDriver { |
133 | 133 | * Auto creates database directory if it does not exist. |
134 | 134 | */ |
135 | 135 | protectedcreateDatabaseDirectory(fullPath: string): Promise<void>{ |
136 | | -returnnewPromise<void>((resolve,reject)=>{ |
137 | | -constmkdirp=PlatformTools.load("mkdirp"); |
138 | | -constpath=PlatformTools.load("path"); |
139 | | -mkdirp(path.dirname(fullPath),(err: any)=>err ? reject(err) : resolve()); |
140 | | -}); |
| 136 | +constmkdirp=PlatformTools.load("mkdirp"); |
| 137 | +constpath=PlatformTools.load("path"); |
| 138 | +returnmkdirp(path.dirname(fullPath)); |
141 | 139 | } |
142 | 140 |
|
143 | 141 | } |
0 commit comments