@rwillians/qx 0.1.12 → 0.1.14

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.
@@ -508,7 +508,7 @@ exports.connect = connect;
508
508
  /**
509
509
  * @public An in-memory database connection.
510
510
  * @since 0.1.12
511
- * @version 1
511
+ * @version 2
512
512
  */
513
- const inmemory = connect(':memory:');
513
+ const inmemory = () => connect(':memory:');
514
514
  exports.inmemory = inmemory;
package/dist/cjs/index.js CHANGED
@@ -290,6 +290,21 @@ const expr = {
290
290
  * @version 1
291
291
  */
292
292
  not: (expr) => ({ not: expr }),
293
+ // // // // // // // // // // // // // // // // // // // // // // //
294
+ // SEMANTICS ONLY //
295
+ // // // // // // // // // // // // // // // // // // // // // // //
296
+ /**
297
+ * @public Builds an ascending order expression.
298
+ * @since 0.1.13
299
+ * @version 1
300
+ */
301
+ asc: (expr) => [expr, 'ASC'],
302
+ /**
303
+ * @public Builds a descending order expression.
304
+ * @since 0.1.13
305
+ * @version 1
306
+ */
307
+ desc: (expr) => [expr, 'DESC'],
293
308
  };
294
309
  exports.expr = expr;
295
310
  /**
@@ -504,9 +504,9 @@ const connect = (...args) => new BunSQLite(new Database(...args));
504
504
  /**
505
505
  * @public An in-memory database connection.
506
506
  * @since 0.1.12
507
- * @version 1
507
+ * @version 2
508
508
  */
509
- const inmemory = connect(':memory:');
509
+ const inmemory = () => connect(':memory:');
510
510
  // // // // // // // // // // // // // // // // // // // // // // // //
511
511
  // EXPORTS //
512
512
  // // // // // // // // // // // // // // // // // // // // // // // //
package/dist/esm/index.js CHANGED
@@ -285,6 +285,21 @@ const expr = {
285
285
  * @version 1
286
286
  */
287
287
  not: (expr) => ({ not: expr }),
288
+ // // // // // // // // // // // // // // // // // // // // // // //
289
+ // SEMANTICS ONLY //
290
+ // // // // // // // // // // // // // // // // // // // // // // //
291
+ /**
292
+ * @public Builds an ascending order expression.
293
+ * @since 0.1.13
294
+ * @version 1
295
+ */
296
+ asc: (expr) => [expr, 'ASC'],
297
+ /**
298
+ * @public Builds a descending order expression.
299
+ * @since 0.1.13
300
+ * @version 1
301
+ */
302
+ desc: (expr) => [expr, 'DESC'],
288
303
  };
289
304
  /**
290
305
  * @public Expression type guards.
@@ -53,7 +53,7 @@ declare const connect: (...args: ConstructorParameters<typeof Database>) => BunS
53
53
  /**
54
54
  * @public An in-memory database connection.
55
55
  * @since 0.1.12
56
- * @version 1
56
+ * @version 2
57
57
  */
58
- declare const inmemory: BunSQLite;
58
+ declare const inmemory: () => BunSQLite;
59
59
  export { connect, inmemory, };
@@ -650,6 +650,18 @@ declare const expr: {
650
650
  * @version 1
651
651
  */
652
652
  not: <E extends Expr>(expr: E) => ExprNot;
653
+ /**
654
+ * @public Builds an ascending order expression.
655
+ * @since 0.1.13
656
+ * @version 1
657
+ */
658
+ asc: (expr: Expr) => readonly [Expr, "ASC"];
659
+ /**
660
+ * @public Builds a descending order expression.
661
+ * @since 0.1.13
662
+ * @version 1
663
+ */
664
+ desc: (expr: Expr) => readonly [Expr, "DESC"];
653
665
  };
654
666
  /**
655
667
  * @public Expression type guards.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rwillians/qx",
3
3
  "description": "A teeny tiny ORM for SQLite.",
4
- "version": "0.1.12",
4
+ "version": "0.1.14",
5
5
  "author": "Rafael Willians <me@rwillians.com>",
6
6
  "license": "MIT",
7
7
  "repository": {