ts-sql-query
ts-sql-query copied to clipboard
Type-safe SQL query builder like QueryDSL or JOOQ in Java or Linq in .Net for TypeScript with MariaDB, MySql, Oracle, PostgreSql, Sqlite and SqlServer support.
`oracledb` version is `6.4.0` Table definition: ```ts class Foo extends Table { id = this.column('id', 'bigint') // NUMBER } const tFoo = new Foo(); const bar = await connection .selectFrom(tFoo)...
Hello, Given PostgreSQL has a limit of 65535 params in prepared queries, do you have any plans to implement something like described in this blog post ? https://klotzandrew.com/blog/postgres-passing-65535-parameter-limit
Hi. It is possible to extract table name from instance? Something like ```extractTableName(tCustomer)``` // 'customer' ? Thanks
Hello! I'm having trouble understanding the purpose of `ChainedError` in the **src/connections/AbstractConnection.ts** file, specifically in the `transaction` method. In my situation, my services can throw various errors within a transaction,...
It would be nice to have a union/unionAll function that accepts collections of sub queries Example usage: ``` const subQueries = input.blocks.map((block: BlockUpdateInput) => { return conn .selectFrom(tSomeTable) .select({ /*...
Hi, ```ts import {MySqlConnection} from 'ts-sql-query/connections/MySqlConnection'; import {Table} from 'ts-sql-query/Table'; import pick from 'lodash/pick'; import {SelectedValues, UpdatableValues} from 'ts-sql-query/extras/types'; import {extractColumnsFrom} from 'ts-sql-query/extras/utils'; import {dynamicPick} from 'ts-sql-query/dynamicCondition'; class Connection extends...
Hi! I want to export data from MySQL to large csv/json files. I can't store all exported records in RAM and want to use streaming. It will be convenient to...
It is great that the `*FragmentExpression.sql` functions default to converting interpolated values in tagged templates to sql parameters. However, some cases are simplified by enabling direct interpolation. I understand that...
Would you be open to a PR that exposes es modules in the deployed package as `.mjs` artifacts ? This doesn't need to be a breaking change but likely all...
Hi, I wanted to ask if the following complex CTE query which comprises of inserts, deletions, and updates could be modeled with this library. Suppose we have a post system...