Cannot "unregister" a function, collation or aggregate in SQLite3 extension
オープン
まだ誰も着手していません。
Bug
Extension: sqlite3
Status: Needs Triage
- 主要言語
- C
- スター
- 40.4k
- フォーク
- 8.2k
- 平均マージ
- 2日 15時間
- マージ済み PR(30日)
- 103
説明
Description
The following code:
<?php
$db = new SQLite3(':memory:');
$db->createFunction('like', 'strcmp');
$db->createFunction('like', null);
Resulted in this output:
Argument #2 ($callback) must be of type callable, null given
But I expected to be able to unregister the custom like function, as documented in SQLite doc:
To delete an existing SQL function or aggregate, pass NULL pointers for all three function callbacks.
https://www.sqlite.org/c3ref/create_function.html
Passing NULL to SQLite3::create* methods should un-register the existing function.
PHP Version
Any
Operating System
No response
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
エントリーポイントである SQLite3::createFunction から始め、そのコールバック検証を issue にリンクされている SQLite のドキュメントと比較します。カスタム関数の登録を解除するために null を渡すケースのカバレッジを追加し、報告された例と関連する create* の動作が期待どおりの結果になることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- php, sqlite
- 領域
- databases
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 58/100