imodel-pg 0.17.0 → 0.19.0

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/index.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * imodel v0.17.0
2
+ * imodel v0.19.0
3
3
  * (c) 2019-2026 undefined
4
4
  * @license undefined
5
5
  */
package/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * imodel v0.17.0
2
+ * imodel v0.19.0
3
3
  * (c) 2019-2026 undefined
4
4
  * @license undefined
5
5
  */
@@ -66,7 +66,6 @@ function getBaseType(s, {
66
66
  case 'ip':
67
67
  case 'ipv4':
68
68
  case 'ipv6':
69
- return 'cidr';
70
69
  case 'ipnet':
71
70
  case 'ipnetv4':
72
71
  case 'ipnetv6':
@@ -514,6 +513,7 @@ function buildSelect(env, selectList) {
514
513
  /** @type {Sql[]} */
515
514
  const list = [];
516
515
  for (const {
516
+ distinct,
517
517
  table,
518
518
  columns,
519
519
  select,
@@ -529,7 +529,7 @@ function buildSelect(env, selectList) {
529
529
  const orderSql = getOrder(sort);
530
530
  const limitSql = limit && limit > 0 ? Sql('LIMIT', limit) : undefined;
531
531
  const offsetSql = offset && offset > 0 ? Sql('OFFSET', offset) : undefined;
532
- list.push(Sql(Sql`SELECT ${selectSql} FROM ${Table}`, getWhere(env, where), orderSql, limitSql, offsetSql, group?.length ? Sql`GROUP BY ${Sql`,`.glue(group.map(v => Sql.Field(v)))}` : undefined, getWhere(env, having, 'HAVING')));
532
+ list.push(Sql(Sql`SELECT`, distinct ? Sql`DISTINCT` : undefined, Sql`${selectSql}`, Sql`FROM ${Table}`, getWhere(env, where), orderSql, limitSql, offsetSql, group?.length ? Sql`GROUP BY ${Sql`,`.glue(group.map(v => Sql.Field(v)))}` : undefined, getWhere(env, having, 'HAVING')));
533
533
  }
534
534
  if (!list.length) {
535
535
  return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "imodel-pg",
3
- "version": "0.17.0",
3
+ "version": "0.19.0",
4
4
  "dependencies": {
5
5
  "pg": "^8.13.3",
6
6
  "tagged-sql": "^0.9.0"