export async function getTableData(opts: { db: Db; tableShortId: string; viewShortId: string }) {
const { db, tableShortId, viewShortId } = opts
const tableData = await db.query.views.findFirst({
where: and(eq(views.shortId, viewShortId), eq(views.tableId, tableShortId)),
columns: {
shortId: true,
},
with: {
// Get the view for the table
table: {
columns: { shortId: true },
with: {
fields: {
columns: { shortId: true },
},
records: {
//! is it possible to filter records by view.jsonColumn after being parsed
columns: { shortId: true },
with: {
export async function getTableData(opts: { db: Db; tableShortId: string; viewShortId: string }) {
const { db, tableShortId, viewShortId } = opts
const tableData = await db.query.views.findFirst({
where: and(eq(views.shortId, viewShortId), eq(views.tableId, tableShortId)),
columns: {
shortId: true,
},
with: {
// Get the view for the table
table: {
columns: { shortId: true },
with: {
fields: {
columns: { shortId: true },
},
records: {
//! is it possible to filter records by view.jsonColumn after being parsed
columns: { shortId: true },
with: {