@datalexor/drizzle
v0.1.3
Published
This library converts data filtering DSL to drizzle where clause.
Downloads
11
Readme
Datalexor Drizzle
This library converts data filtering DSL to drizzle where clause.
Installation
yarn add @datalexor/core @datalexor/drizzle
Usage
import { toDrizzle } from '@datalexor/drizzle';
const query = 'field eq "A"';
const rows = await db.select().from(users).where(toDrizzle(users, query, ['field']))
import { toDrizzle } from '@datalexor/drizzle';
const query = 'field eq "A"';
const rows = await db.select().from(users).where(
and(
eq(users.tenantId, 1),
toDrizzle(users, query, ['field'])
)
)