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