AdoNetCore.AseClient
AdoNetCore.AseClient copied to clipboard
[linq2db] DbConnection.GetSchema API support
Right now this API is not implemented and throws NotSupportedException from base class.
linq2db use following schema tables for ASE:
- DataTypes
- Procedures
- ProcedureParameters
for other metadata we query system tables directly.
Why this feature is important for linq2db - schema provider used to generate data model from database using T4 templates.
Another important thing is support for CommandBehavior.SchemaOnly
for procedures. Native provider (or in worst case ASE itself) has bug in this area, where it executes procedure for real which is very bad. See https://github.com/linq2db/linq2db/issues/792. We fixed it for native provider on our side by wrapping such calls in transactions with rollback.
linq2db test: SchemaProviderTest.IncludeExcludeCatalogTest
I would say, it has lower priority compared to bugs, as we can try to replace those calls on our side with queries to system tables for time being
@MaceWindu - On your point about CommandBehaviour.SchemaOnly
and using a transaction to work around the SAP driver's bug, ASE does have support for getting a procedure's (or any command's) schema via SET FMTONLY [ON|OFF]
Also, it might be a while before DbConnection.GetSchema
is implemented completely.
However, if all you rely on is DataTypes
, Procedures
, and ProcedureParameters
then we could push out a partial implementation...
Thanks for fmtonly
, will try it later, if it works, it meant that native provider doesn't set it...
As for API, as I said - we can workaround it on our side, so no rush here
FYI, this API is not required for linq2db anymore, as I implemented required functionality on our side. So if nobody else needs it ATM, you can postpone it