@mikro-orm/sqlite 6.3.11-dev.2 → 6.3.11-dev.20

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/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
 
@@ -1,10 +1,8 @@
1
- import { type EntityProperty } from '@mikro-orm/core';
2
1
  import { BaseSqlitePlatform } from '@mikro-orm/knex';
3
2
  import { SqliteSchemaHelper } from './SqliteSchemaHelper';
4
3
  import { SqliteExceptionConverter } from './SqliteExceptionConverter';
5
4
  export declare class SqlitePlatform extends BaseSqlitePlatform {
6
5
  protected readonly schemaHelper: SqliteSchemaHelper;
7
6
  protected readonly exceptionConverter: SqliteExceptionConverter;
8
- quoteVersionValue(value: Date | number, prop: EntityProperty): Date | string | number;
9
- quoteValue(value: any): string;
7
+ escape(value: any): string;
10
8
  }
package/SqlitePlatform.js CHANGED
@@ -3,27 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SqlitePlatform = 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 SqliteSchemaHelper_1 = require("./SqliteSchemaHelper");
9
8
  const SqliteExceptionConverter_1 = require("./SqliteExceptionConverter");
10
9
  class SqlitePlatform extends knex_1.BaseSqlitePlatform {
11
10
  schemaHelper = new SqliteSchemaHelper_1.SqliteSchemaHelper(this);
12
11
  exceptionConverter = new SqliteExceptionConverter_1.SqliteExceptionConverter();
13
- quoteVersionValue(value, prop) {
14
- if (prop.runtimeType === 'Date') {
15
- return (0, sqlstring_sqlite_1.escape)(value, true, this.timezone).replace(/^'|\.\d{3}'$/g, '');
16
- }
17
- return value;
18
- }
19
- quoteValue(value) {
20
- /* istanbul ignore if */
21
- if (core_1.Utils.isPlainObject(value) || value?.[core_1.JsonProperty]) {
22
- return (0, sqlstring_sqlite_1.escape)(JSON.stringify(value), true, this.timezone);
23
- }
24
- if (value instanceof Date) {
25
- return '' + +value;
26
- }
12
+ escape(value) {
27
13
  return (0, sqlstring_sqlite_1.escape)(value, true, this.timezone);
28
14
  }
29
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mikro-orm/sqlite",
3
- "version": "6.3.11-dev.2",
3
+ "version": "6.3.11-dev.20",
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.2",
61
+ "@mikro-orm/knex": "6.3.11-dev.20",
62
62
  "fs-extra": "11.2.0",
63
63
  "sqlite3": "5.1.7",
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.2"
70
+ "@mikro-orm/core": "6.3.11-dev.20"
71
71
  }
72
72
  }