@mastra/lance 1.5.2-alpha.1 → 1.5.2
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/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/index.cjs +7 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/storage/db/index.d.ts.map +1 -1
- package/dist/vector/filter.d.ts.map +1 -1
- package/dist/vector/index.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/docs/SKILL.md
CHANGED
package/dist/index.cjs
CHANGED
|
@@ -412,7 +412,7 @@ var LanceDB = class extends _mastra_core_base.MastraBase {
|
|
|
412
412
|
const quotedKey = /^[a-z][a-zA-Z]*$/.test(key) && /[A-Z]/.test(key) ? `\`${key}\`` : key;
|
|
413
413
|
if (typeof value === "string") return `${quotedKey} = '${value}'`;
|
|
414
414
|
else if (value === null) return `${quotedKey} IS NULL`;
|
|
415
|
-
|
|
415
|
+
return `${quotedKey} = ${value}`;
|
|
416
416
|
}).join(" AND ");
|
|
417
417
|
this.logger.debug("where clause generated: " + filterConditions);
|
|
418
418
|
query.where(filterConditions);
|
|
@@ -1986,13 +1986,13 @@ var LanceFilterTranslator = class extends _mastra_core_vector_filter.BaseFilterT
|
|
|
1986
1986
|
if (keys.length > 1) return keys.map((key) => {
|
|
1987
1987
|
const value = obj[key];
|
|
1988
1988
|
if (this.isNestedObject(value) && !this.isDateObject(value)) return this.processNestedObject(key, value);
|
|
1989
|
-
|
|
1989
|
+
return this.processField(key, value);
|
|
1990
1990
|
}).join(" AND ");
|
|
1991
1991
|
if (keys.length === 1) {
|
|
1992
1992
|
const key = keys[0];
|
|
1993
1993
|
const value = obj[key];
|
|
1994
1994
|
if (this.isNestedObject(value) && !this.isDateObject(value)) return this.processNestedObject(key, value);
|
|
1995
|
-
|
|
1995
|
+
return this.processField(key, value);
|
|
1996
1996
|
}
|
|
1997
1997
|
}
|
|
1998
1998
|
return "";
|
|
@@ -2007,7 +2007,7 @@ var LanceFilterTranslator = class extends _mastra_core_vector_filter.BaseFilterT
|
|
|
2007
2007
|
const keys = Object.keys(condObj);
|
|
2008
2008
|
if (keys.length === 1 && this.isOperator(keys[0])) {
|
|
2009
2009
|
if (this.isLogicalOperator(keys[0])) return `(${this.processLogicalOperator(keys[0], condObj[keys[0]])})`;
|
|
2010
|
-
|
|
2010
|
+
throw new Error(_mastra_core_vector_filter.BaseFilterTranslator.ErrorMessages.UNSUPPORTED_OPERATOR(keys[0]));
|
|
2011
2011
|
}
|
|
2012
2012
|
if (keys.length > 1) return `(${this.processFilter(condition)})`;
|
|
2013
2013
|
return this.processFilter(condition);
|
|
@@ -2022,7 +2022,7 @@ var LanceFilterTranslator = class extends _mastra_core_vector_filter.BaseFilterT
|
|
|
2022
2022
|
return keys.map((key) => {
|
|
2023
2023
|
const nestedPath = key.includes(".") ? `${path}.${key}` : `${path}.${key}`;
|
|
2024
2024
|
if (this.isNestedObject(obj[key]) && !this.isDateObject(obj[key])) return this.processNestedObject(nestedPath, obj[key]);
|
|
2025
|
-
|
|
2025
|
+
return this.processField(nestedPath, obj[key]);
|
|
2026
2026
|
}).join(" AND ");
|
|
2027
2027
|
}
|
|
2028
2028
|
processField(field, value) {
|
|
@@ -2594,7 +2594,8 @@ var LanceVectorStore = class LanceVectorStore extends _mastra_core_vector.Mastra
|
|
|
2594
2594
|
}
|
|
2595
2595
|
this.logger.debug(`Table ${resolvedTableName} created. Index creation deferred until data is available.`);
|
|
2596
2596
|
return;
|
|
2597
|
-
}
|
|
2597
|
+
}
|
|
2598
|
+
table = await this.lanceClient.openTable(resolvedTableName);
|
|
2598
2599
|
const metricType = this.mastraMetricToLance(metric);
|
|
2599
2600
|
const rowCount = await table.countRows();
|
|
2600
2601
|
if (rowCount < 256) {
|