@mastra/dsql 1.3.0-alpha.1 → 1.3.0-alpha.3

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/dist/index.js CHANGED
@@ -1820,6 +1820,7 @@ function inPlaceholders(count, startIndex = 1) {
1820
1820
  return Array.from({ length: count }, (_, i) => `$${i + startIndex}`).join(", ");
1821
1821
  }
1822
1822
  var MemoryDSQL = class MemoryDSQL extends MemoryStorage {
1823
+ supportsPartialThreadUpdate = true;
1823
1824
  #db;
1824
1825
  #schema;
1825
1826
  #skipDefaultIndexes;
@@ -2100,7 +2101,7 @@ var MemoryDSQL = class MemoryDSQL extends MemoryStorage {
2100
2101
  text: `Thread ${id} not found`,
2101
2102
  details: {
2102
2103
  threadId: id,
2103
- title
2104
+ title: title ?? null
2104
2105
  }
2105
2106
  });
2106
2107
  const mergedMetadata = {
@@ -2110,14 +2111,14 @@ var MemoryDSQL = class MemoryDSQL extends MemoryStorage {
2110
2111
  const now = (/* @__PURE__ */ new Date()).toISOString();
2111
2112
  const thread = await this.#db.client.one(`UPDATE ${threadTableName}
2112
2113
  SET
2113
- title = $1,
2114
+ title = COALESCE($1, title),
2114
2115
  metadata = $2,
2115
2116
  "updatedAt" = $3::timestamp,
2116
2117
  "updatedAtZ" = $4::timestamptz
2117
2118
  WHERE id = $5
2118
2119
  RETURNING *
2119
2120
  `, [
2120
- title,
2121
+ title ?? null,
2121
2122
  JSON.stringify(mergedMetadata),
2122
2123
  now,
2123
2124
  now,
@@ -2141,7 +2142,7 @@ var MemoryDSQL = class MemoryDSQL extends MemoryStorage {
2141
2142
  category: ErrorCategory.THIRD_PARTY,
2142
2143
  details: {
2143
2144
  threadId: id,
2144
- title
2145
+ title: title ?? null
2145
2146
  }
2146
2147
  }, error);
2147
2148
  });