You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
query<C extends UserDatabaseClient, R>(qry: (dbclient: C) => Promise<R>):
This is how I would write my code (I can do it already)
No need for any extra args defined but just the dbclient,
let username = getItFromSomewhere();
const u = await ctx.query(
(dbClient: Knex) => {
return dbClient<UserTable>(userTableName).select("username").where({ username: username })
}
);
Instead of
let user = getItFromSomewhere();
const u = await ctx.query(
(dbClient: Knex, user: string) => {
return dbClient<UserTable>(userTableName).select("username").where({ username: user })
},
user
);
The text was updated successfully, but these errors were encountered:
This is a suggestion for v2
The following type definition in
httpServer/middleware.ts
looks a bit odd (somewhat golang like).The following definition is a lot cleaner.
This is how I would write my code (I can do it already)
No need for any extra args defined but just the dbclient,
Instead of
The text was updated successfully, but these errors were encountered: