@mikro-orm/libsql 6.3.11-dev.2 → 6.3.11-dev.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LibSqlPlatform.d.ts +1 -3
- package/LibSqlPlatform.js +1 -16
- package/README.md +1 -0
- package/package.json +3 -3
package/LibSqlPlatform.d.ts
CHANGED
|
@@ -1,10 +1,8 @@
|
|
|
1
|
-
import { type EntityProperty } from '@mikro-orm/core';
|
|
2
1
|
import { BaseSqlitePlatform } from '@mikro-orm/knex';
|
|
3
2
|
import { LibSqlSchemaHelper } from './LibSqlSchemaHelper';
|
|
4
3
|
import { LibSqlExceptionConverter } from './LibSqlExceptionConverter';
|
|
5
4
|
export declare class LibSqlPlatform extends BaseSqlitePlatform {
|
|
6
5
|
protected readonly schemaHelper: LibSqlSchemaHelper;
|
|
7
6
|
protected readonly exceptionConverter: LibSqlExceptionConverter;
|
|
8
|
-
|
|
9
|
-
quoteValue(value: any): string;
|
|
7
|
+
escape(value: any): string;
|
|
10
8
|
}
|
package/LibSqlPlatform.js
CHANGED
|
@@ -3,28 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.LibSqlPlatform = void 0;
|
|
4
4
|
// @ts-ignore
|
|
5
5
|
const sqlstring_sqlite_1 = require("sqlstring-sqlite");
|
|
6
|
-
const core_1 = require("@mikro-orm/core");
|
|
7
6
|
const knex_1 = require("@mikro-orm/knex");
|
|
8
7
|
const LibSqlSchemaHelper_1 = require("./LibSqlSchemaHelper");
|
|
9
8
|
const LibSqlExceptionConverter_1 = require("./LibSqlExceptionConverter");
|
|
10
9
|
class LibSqlPlatform extends knex_1.BaseSqlitePlatform {
|
|
11
10
|
schemaHelper = new LibSqlSchemaHelper_1.LibSqlSchemaHelper(this);
|
|
12
11
|
exceptionConverter = new LibSqlExceptionConverter_1.LibSqlExceptionConverter();
|
|
13
|
-
|
|
14
|
-
/* istanbul ignore if */
|
|
15
|
-
if (prop.runtimeType === 'Date') {
|
|
16
|
-
return (0, sqlstring_sqlite_1.escape)(value, true, this.timezone).replace(/^'|\.\d{3}'$/g, '');
|
|
17
|
-
}
|
|
18
|
-
return value;
|
|
19
|
-
}
|
|
20
|
-
quoteValue(value) {
|
|
21
|
-
/* istanbul ignore if */
|
|
22
|
-
if (core_1.Utils.isPlainObject(value) || value?.[core_1.JsonProperty]) {
|
|
23
|
-
return (0, sqlstring_sqlite_1.escape)(JSON.stringify(value), true, this.timezone);
|
|
24
|
-
}
|
|
25
|
-
if (value instanceof Date) {
|
|
26
|
-
return '' + +value;
|
|
27
|
-
}
|
|
12
|
+
escape(value) {
|
|
28
13
|
return (0, sqlstring_sqlite_1.escape)(value, true, this.timezone);
|
|
29
14
|
}
|
|
30
15
|
}
|
package/README.md
CHANGED
|
@@ -164,6 +164,7 @@ You can find example integrations for some popular frameworks in the [`mikro-orm
|
|
|
164
164
|
- [Accounts.js REST and GraphQL authentication + SQLite](https://github.com/darkbasic/mikro-orm-accounts-example)
|
|
165
165
|
- [Nest + Shopify + PostgreSQL + GraphQL](https://github.com/Cloudshelf/Shopify_CSConnector)
|
|
166
166
|
- [Elysia.js + libSQL + Bun](https://github.com/mikro-orm/elysia-bun-example-app)
|
|
167
|
+
- [Electron.js + PostgreSQL](https://github.com/adnanlah/electron-mikro-orm-example-app)
|
|
167
168
|
|
|
168
169
|
### JavaScript Examples
|
|
169
170
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mikro-orm/libsql",
|
|
3
|
-
"version": "6.3.11-dev.
|
|
3
|
+
"version": "6.3.11-dev.21",
|
|
4
4
|
"description": "TypeScript ORM for Node.js based on Data Mapper, Unit of Work and Identity Map patterns. Supports MongoDB, MySQL, PostgreSQL and SQLite databases as well as usage with vanilla JavaScript.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "index.mjs",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@mikro-orm/knex": "6.3.11-dev.
|
|
61
|
+
"@mikro-orm/knex": "6.3.11-dev.21",
|
|
62
62
|
"fs-extra": "11.2.0",
|
|
63
63
|
"libsql": "0.4.5",
|
|
64
64
|
"sqlstring-sqlite": "0.1.1"
|
|
@@ -67,6 +67,6 @@
|
|
|
67
67
|
"@mikro-orm/core": "^6.3.10"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
|
-
"@mikro-orm/core": "6.3.11-dev.
|
|
70
|
+
"@mikro-orm/core": "6.3.11-dev.21"
|
|
71
71
|
}
|
|
72
72
|
}
|