codemix / codemix/ts-sql

Are there any serious projects doing this?

オープン
#8 コメント 15 件 リアクション 2 件 担当者 0 名 GitHub で見る
主要言語
TypeScript
スター
3.3k
フォーク
53
PR マージ指標
30日以内にマージされた PR はありません

説明

This is crazy impressive! 😄

What would be really cool, is if we could actually turn this into something useful.

Imagine something like this?

```ts
const sql = createShema({
users: {
user_id: type.number(),
email: type.string(255),
// ...
}
});

const userQuery = sql("SELECT * FROM users WHERE user_id = :user_id").bind({ user_id: 123 });
```

Imagine this would validate query structure and schema names, and return a type that infers the shape of the rows.

Something like [`sql-template-tag`](https://www.npmjs.com/package/sql-template-tag) but type-safe, and with placeholders (and subsequent binding) rather than template literals.

(since, sadly, typescript [doesn't](https://github.com/microsoft/TypeScript/issues/33304#issuecomment-1637784732) seem to support type-safe template literal functions...)

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

調査の方向性

この issue は、範囲が定められた実装タスクというより提案であり、ファイル、テスト、エントリーポイントを指定していません。まず repository と、リンクされている sql-template-tag および TypeScript のリファレンスを確認してください。作業完了と見なすには、具体的な API、実装範囲、受け入れ基準を定める必要があります。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
sql, typescript
領域
databases
issue の種類
機能追加
難易度
5/5
見積もり時間
1週間以上
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
20/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。