Adapter should be able to define default primary key type
- 主要言語
- JavaScript
- スター
- 2k
- フォーク
- 238
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Right now in schema.js (https://github.com/1602/jugglingdb/blob/master/lib/schema.js#L232): `properties.id = properties.id || {type: Number}`
It's not correct for RethinkDB for example, where default id is UUID represented as String. It does not really matter for relations if you defineForeignKey properly, but if you try to implement data type check when converting to/from database values it could bring up problems.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
The issue points to lib/schema.js line 232 where the default primary key type is hardcoded to Number. Look at how adapters (like the RethinkDB adapter) are structured to understand how to let an adapter define its own default ID type. Check existing adapter files for patterns, then modify schema.js to read a default from the adapter. Test by creating a model without an explicit ID definition and verifying the correct type is used.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- databases, javascript, node.js
- 領域
- backend, databases
- issue の種類
- バグ
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 65/100