Skip to content

Commit

Permalink
Revert "added supabase boolean column functionality"
Browse files Browse the repository at this point in the history
This reverts commit 21f1504.
  • Loading branch information
nick-w-nick committed Dec 21, 2024
1 parent 21d5f7b commit 6ff9229
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions libs/langchain-community/src/structured_query/supabase.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import {
isFilterEmpty,
isBoolean,
isFloat,
isInt,
isObject,
Expand Down Expand Up @@ -29,8 +28,8 @@ import {
* structured query. It can be a string or a number.
*/
type ValueType = {
eq: string | number | boolean;
ne: string | number | boolean;
eq: string | number;
ne: string | number;
lt: string | number;
lte: string | number;
gt: string | number;
Expand Down Expand Up @@ -127,16 +126,14 @@ export class SupabaseTranslator<
* @param includeType Whether to include the data type in the column name.
* @returns The built column name.
*/
buildColumnName(attr: string, value: string | number | boolean, includeType = true) {
buildColumnName(attr: string, value: string | number, includeType = true) {
let column = "";
if (isString(value)) {
column = `metadata->>${attr}`;
} else if (isInt(value)) {
column = `metadata->${attr}${includeType ? "::int" : ""}`;
} else if (isFloat(value)) {
column = `metadata->${attr}${includeType ? "::float" : ""}`;
} else if(isBoolean(value)) {
column = `metadata->${attr}${includeType ? "::bool" : ""}`;
} else {
throw new Error("Data type not supported");
}
Expand Down

0 comments on commit 6ff9229

Please sign in to comment.