Support for MySQL functions?
- 主要言語
- JavaScript
- スター
- 2k
- フォーク
- 238
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hey,
I'd like to use MySQL functions like MBRContains() and GeomFromText(), is there a way to do that?
Right now I'd like to set the `location` property of my model instance to `GeomFromText("LINESTRING(0 0, 1 1)", 4055)`, but (of course) the mysql adapter escapes it.
For querying, you could introduce a `conditions` property for the .all() function that takes a string and a splash of arguments that will be escaped and placed into the question marks inside the string. Just like rails does it.
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
Look at the MySQL adapter's escaping logic, likely in lib/adapters/mysql.js or similar. The user wants to pass raw SQL functions like GeomFromText for model properties and use a conditions property for .all() queries. Start by examining how property values are currently escaped and how query conditions are built. Check if there's existing support for raw SQL fragments. 'Done' means the adapter can accept and not escape specific MySQL functions for both data assignment and query conditions.
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript, mysql
- 領域
- backend, database
- issue の種類
- 機能追加
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100