[Question] Are composite types defined in PostgreSQL supported by SQLProvider?
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 25/100
- issue の種類
- 機能追加
- 明瞭さ
- 説明が足りない
- 活発さ
- 停滞
- 技術スタック
- fsharp, postgresql
- 領域
- databases
調査の方向性
PostgreSQLTests.fsx から始め、SQLProvider がストアドプロシージャのパラメーターをどのように検出して表現するかを追跡します。報告されている複合型のシグネチャを、既存の PostgreSQL 型の例および Npgsql の回避策と比較します。複合型がサポートされているかを明らかにし、必要なマッピングまたは制限を文書化またはテストできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
Database has composite types defined which are input/output types to stored procedures. I am attempting to call the said procedure with input parameters. SqlProvider does not see the input parameter and assumes it is a void function.
Repro steps
The composite type defined in the database is
CREATE TYPE product_t AS
(name text,
product_type text)
The signature of procedure in the database is
create or replace function func_iproduct( p product_t ) returns void as
On .NET side (F#), I have created a type
type PgProductType(Name:string,ProductType:string)=
member this.Name = Name
member this.ProductType = ProductType
new() = PgProductType("","")
I believe there should be a way in which I could tell SqlProvider how to map PgProductType to product_t; not sure if this is required or such mapping is automatic. If required, an example how do I go about doing it would be helpful. Without this mapping, if I attempt to execute the procedure, the error message it reports back indicates that SqlProvider does NOT see the input parameter;
let prd = new PgProductType("F#Product","")
ctx.Functions.FuncIproduct.Invoke(prd)
stdin(29,1): error FS0501: The member or object constructor 'Invoke' takes 0 argument(s) but is here given 1. The required signature is 'SqlDataProvider<...>.dataContext.Functions.FuncIproduct.Result.Invoke() : Unit'.
Question
- Can I use postgresql composite types? If so, an illustrative example would help.The test suite PostgreSQLTests.fsx does not contain an example to map custom types (though there are examples to map pre-defined postgresql types).
- Any alternative solution short of re-implementing queries (using query expressions) foregoing the existing procedures?
Known workarounds
Directly use Npgsql
Related information
- PostgreSQL 9.6
- Win 7
- 主要言語
- F#
- スター
- 627
- フォーク
- 147
- 平均マージ
- 2時間 2分
- マージ済み PR(30日)
- 1
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
fsprojects/SQLProvider のほかの issue
-
enhancement
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
fsprojects/SQLProvider#872 · コメント 2 件 ·
-
Repo Assist? オープンenhancement
難易度 5/5 1週間以上 初心者へのやさしさ 10/100
fsprojects/SQLProvider#870 · コメント 1 件 ·
-
postgresql
難易度 4/5 3〜5日 初心者へのやさしさ 58/100
fsprojects/SQLProvider#869 · コメント 2 件 ·
-
documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 42/100
fsprojects/SQLProvider#868 · コメント 2 件 ·
-
sql server
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
fsprojects/SQLProvider#851 · コメント 1 件 ·
fsprojects/SQLProvider の issue をすべて見る
似ている issue
-
[6.x]: "Cannot use object of type stdClass as array" loading Users index (regression of #19182) オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
community-scripts/ProxmoxVE#17396 · コメント 1 件 ·
-
bug possible-duplicate
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
AOSSIE-Org/PictoPy#1553 · コメント 4 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
BasedHardware/omi#15274 · コメント 3 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100