@quantform/sqlite 0.6.4 → 0.6.5

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.
@@ -1 +1 @@
1
- {"version":3,"file":"sqlite-storage.d.ts","sourceRoot":"","sources":["../src/sqlite-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EACd,OAAO,EACP,eAAe,EACf,mBAAmB,EAEpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,wBAAgB,MAAM,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,cAAc,CAOzD;AAED,qBAAa,aAAc,YAAW,OAAO;IAG/B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAFrC,SAAS,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC;gBAEH,QAAQ,EAAE,MAAM;IAE7C,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,cAAc;IAehB,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAa/B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAuChF,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAoBzE"}
1
+ {"version":3,"file":"sqlite-storage.d.ts","sourceRoot":"","sources":["../src/sqlite-storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,cAAc,EACd,OAAO,EACP,eAAe,EACf,mBAAmB,EAEpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,wBAAgB,MAAM,CAAC,SAAS,CAAC,EAAE,MAAM,GAAG,cAAc,CAOzD;AAED,qBAAa,aAAc,YAAW,OAAO;IAG/B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IAFrC,SAAS,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC;gBAEH,QAAQ,EAAE,MAAM;IAE7C,OAAO,CAAC,UAAU;IAYlB,OAAO,CAAC,cAAc;IAehB,KAAK,IAAI,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAa/B,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAwChF,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAoBzE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quantform/sqlite",
3
- "version": "0.6.4",
3
+ "version": "0.6.5",
4
4
  "license": "MIT",
5
5
  "author": "Mateusz Majchrzak",
6
6
  "description": "Node.js library for building systematic trading strategies in reactive way.",
@@ -18,10 +18,10 @@
18
18
  },
19
19
  "devDependencies": {
20
20
  "@types/better-sqlite3": "^7.6.0",
21
- "@quantform/core": "0.6.4"
21
+ "@quantform/core": "0.6.5"
22
22
  },
23
23
  "peerDependencies": {
24
- "@quantform/core": "0.6.4"
24
+ "@quantform/core": "0.6.5"
25
25
  },
26
26
  "scripts": {
27
27
  "build": "tsc",
@@ -25,7 +25,7 @@ export function sqlite(directory?: string): SessionFeature {
25
25
  export class SQLiteStorage implements Storage {
26
26
  protected connection?: Database;
27
27
 
28
- constructor(private readonly filename: string) { }
28
+ constructor(private readonly filename: string) {}
29
29
 
30
30
  private tryConnect() {
31
31
  if (this.connection) {
@@ -89,8 +89,9 @@ export class SQLiteStorage implements Storage {
89
89
  let rows = this.connection
90
90
  .prepare(
91
91
  `SELECT * FROM "${library}"
92
- WHERE timestamp > ? AND timestamp < ? ${options.kind ? `AND kind = '${options.kind}'` : ''
93
- }
92
+ WHERE timestamp > ? AND timestamp < ? ${
93
+ options.kind ? `AND kind = '${options.kind}'` : ''
94
+ }
94
95
  ORDER BY timestamp ${isBackward ? 'DESC' : ''}
95
96
  LIMIT ?`
96
97
  )