MSSQL stored procedures does not correctly works with schemas
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza ejecutando los scripts proporcionados del esquema MSSQL y de los stored procedures, y luego reproduce el problema mediante SqlDataProvider.GetDataContext y ctx.Procedures. Rastrea cómo se descubren y exponen los procedimientos con el mismo nombre en clm y eeInf. El trabajo estará terminado cuando ambos procedimientos específicos del esquema sigan siendo distintos y Invoke muestre los parámetros correctos para cada uno.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
SqlDataProvider does not have the functionality to specify schema of stored procedure (in contrast to accessing the tables). Rather, all stored procedures appear under ctx.Procedures where ctx is a database context obtained via call to GetDataContext, e.g.:
type private WorkerNodeDb = SqlDataProvider<
Common.DatabaseProviderTypes.MSSQLSERVER,
ConnectionString = WorkerNodeConnectionStringValue,
UseOptionTypes = Common.NullableColumnType.OPTION>
type private WorkerNodeDbContext = WorkerNodeDb.dataContext
let private getDbContext (c : unit -> ConnectionString) = c().value |> WorkerNodeDb.GetDataContext
This how clm.tryUpdateProgressRunQueue (from schema clm) appears in F#:

Hovering over (as shown on the picture) correctly shows that the stored procedure belongs to clm schema. This is inconvenient but that would've been OK and that could be dealt with.
However, the error appears if there is a stored procedure with the same name but in a different schema (eeInf in the example). The second procedure "acquires" an extra ' in the name:

Unfortunately, finally nothing works. Hovering over Invoke shows SP parameters mixed up from both procedures:

Here are the blank SPs along with schema creation scripts for convenience:
if not exists(select schema_name from information_schema.schemata where schema_name = 'clm') begin
print 'Creating schema clm...'
exec sp_executesql N'create schema clm'
end else begin
print 'Schema clm already exists...'
end
go
if not exists(select schema_name from information_schema.schemata where schema_name = 'eeInf') begin
print 'Creating schema eeInf...'
exec sp_executesql N'create schema eeInf'
end else begin
print 'Schema eeInf already exists...'
end
go
drop procedure if exists clm.tryUpdateProgressRunQueue
go
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create procedure clm.tryUpdateProgressRunQueue (
@runQueueId uniqueidentifier,
@progress decimal(18, 14),
@callCount bigint,
@relativeInvariant float,
@maxEe float,
@maxAverageEe float,
@maxWeightedAverageAbsEe float,
@maxLastEe float)
as
begin
declare @rowCount int
set nocount on;
-- Do something useful here.
set @rowCount = @@rowcount
select @rowCount as [RowCount]
end
go
drop procedure if exists eeInf.tryUpdateProgressRunQueue
go
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create procedure eeInf.tryUpdateProgressRunQueue (
@runQueueId uniqueidentifier,
@progress decimal(18, 14),
@callCount bigint,
@relativeInvariant float,
@dummy float)
as
begin
declare @rowCount int
set nocount on;
-- Do something useful here.
set @rowCount = @@rowcount
select @rowCount as [RowCount]
end
go
I am using SQLProvider version 1.3.7 and MSSQL.
- Lenguaje dominante
- F#
- Estrellas
- 627
- Forks
- 147
- Merge medio
- 2 h 2 min
- PR fusionados (30 d)
- 1
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de fsprojects/SQLProvider
-
enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
fsprojects/SQLProvider#872 · 2 comentarios ·
-
Repo Assist? Abiertoenhancement
Dificultad 5/5 Más de una semana Aptitud para principiantes 10/100
fsprojects/SQLProvider#870 · 1 comentario ·
-
postgresql
Dificultad 4/5 3-5 días Aptitud para principiantes 58/100
fsprojects/SQLProvider#869 · 2 comentarios ·
-
documentation
Dificultad 2/5 1-3 horas Aptitud para principiantes 42/100
fsprojects/SQLProvider#868 · 2 comentarios ·
-
sql server
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
fsprojects/SQLProvider#851 · 1 comentario ·
Todos los issues de fsprojects/SQLProvider
Issues similares
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 75/100
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
AstrBotDevs/AstrBot#10205 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
OHDSI/Data2Evidence#3394 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100