This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export const getSubPriorityStatus = ( | |
| line: Omit<DailyWorkOrderResult, "followUpType">, | |
| ) => { | |
| if (line.ivrStatus === "IN PROGRESS:ON SITE") { | |
| return "01. IVR ONSITE"; | |
| } | |
| if ( | |
| line.Status_of_Call !== "COMPLETE" && | |
| line.Type_of_Problem === "EMERGENCY" | |
| ) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| test.serial('transaction with RLS', async (t) => { | |
| const { db } = t.context; | |
| const users = pgTable('users_transactions', { | |
| id: serial('id').primaryKey(), | |
| name: text('name').notNull(), | |
| lastName: text('lastname'), | |
| }); | |
| await db.execute(sql`drop table if exists ${users}`); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { MySqlTable } from "drizzle-orm/mysql-core"; | |
| import { db as drizzleDb } from "./mysql/mysql2"; | |
| import { eq } from "drizzle-orm"; | |
| import { users } from "./mysql/schema"; | |
| interface Reader<T extends MySqlTable & { id: any }> { | |
| findAll(): Promise<T["$inferSelect"][]>; | |
| findOne(id: number): Promise<T["$inferSelect"] | undefined>; | |
| } |