Return type of stored procedures that use temporary tables

Aperta
#364 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
20/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
fsharp, sql
Ambito
databases

Direzione di ricerca

La issue non indica file di implementazione né test. Inizia riproducendo la procedura MSSQL e ispezionando Sql.GetDataContext().Procedures.Test.Invoke; il lavoro è completato quando è possibile accedere ai result set restituiti, idealmente con i tipi o almeno dinamicamente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement sql server
Description

Stored procedures such as the one below have a return type Unit when invoked.

Repro steps
  1. Create the stored procedure
CREATE PROCEDURE [Test]
AS
BEGIN
  CREATE TABLE #_T (ID int NOT NULL, PRIMARY KEY (ID))
  INSERT INTO #_T(ID)
  VALUES (1)

  SELECT 1
  SELECT 2
  SELECT 3
END
  1. Access the stored procedure using the type provider and inspect the result type
let value = Sql.GetDataContext().Procedures.Test.Invoke ()
// val value : Unit
Expected behavior

Ideally, I'd like to see each result set fully typed. In the worst case, I'd at least want to access the result sets in a dynamic fashion.

Actual behavior

The return type of the sproc is Unit and there is no way to access the returned data.

Known workarounds

None that I know of other than getting rid of temporary tables :)

Related information
  • Used database
    MSSQL
  • SQLProvider version
    1.0.37
Lingua principale
F#
Stelle
627
Fork
147
Merge medio
2h 2m
PR unite (30g)
1

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di fsprojects/SQLProvider

Tutte le issue di fsprojects/SQLProvider

Issue simili

Altre issue su Databases

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.