@mastra/pg 1.10.1-alpha.0 → 1.10.1-alpha.1
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/CHANGELOG.md +19 -0
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/docs/references/docs-memory-semantic-recall.md +68 -6
- package/dist/index.cjs +12 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -3
- package/dist/index.js.map +1 -1
- package/dist/storage/domains/memory/index.d.ts +2 -1
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -7855,12 +7855,21 @@ var MemoryPG = class _MemoryPG extends MemoryStorage {
|
|
|
7855
7855
|
resourceId: row.resourceId
|
|
7856
7856
|
};
|
|
7857
7857
|
}
|
|
7858
|
-
async getThreadById({
|
|
7858
|
+
async getThreadById({
|
|
7859
|
+
threadId,
|
|
7860
|
+
resourceId
|
|
7861
|
+
}) {
|
|
7859
7862
|
try {
|
|
7860
7863
|
const tableName = getTableName4({ indexName: TABLE_THREADS, schemaName: getSchemaName4(this.#schema) });
|
|
7864
|
+
let query = `SELECT * FROM ${tableName} WHERE id = $1`;
|
|
7865
|
+
let params = [threadId];
|
|
7866
|
+
if (resourceId !== void 0) {
|
|
7867
|
+
query += ` AND "resourceId" = $2`;
|
|
7868
|
+
params.push(resourceId);
|
|
7869
|
+
}
|
|
7861
7870
|
const thread = await this.#db.client.oneOrNone(
|
|
7862
|
-
|
|
7863
|
-
|
|
7871
|
+
query,
|
|
7872
|
+
params
|
|
7864
7873
|
);
|
|
7865
7874
|
if (!thread) {
|
|
7866
7875
|
return null;
|