express-kysely
v0.0.1
Published
A TypeScript library designed to generate SQL queries directly from Express.js request objects, utilizing the powerful Kysely ORM.
Downloads
4
Readme
A JavaScript library designed to generate SQL queries directly from Express.js request objects, utilizing the powerful Kysely ORM.
This tool simplifies the development of API endpoints by automatically translating query parameters and request data into structured SQL, enhancing both development efficiency and query consistency.
let query = db
.selectFrom('teacher')
.selectFromRequest(req)
.includeFromRequest(
req,
'teacher',
[
'distribution',
'distribution_replace_by',
'distribution_replace_who',
'lectures',
],
relations
)
.filterODataFromRequest(req)
.paginationFromRequest(req);
res.status(200).json(await query.execute());