Comments (4)
I have a database agnostic application that overrides System.Data.Common classes. It appears that several are missing like CommandBuilder and especially DataAdapter. Are there any plans to support these classes?
Thanks!
from duckdb.net.
No plans currently.
from duckdb.net.
I think it is not too hard. Using the SQLite library as a go-by (not copying) I confirmed several things and wrote DuckDBCommandBuilder and DuckDBDataAdapter. The latter appears to be trivial, but CommandBuilder is about 200 lines of verbose VB code (can be easily converted to C#). I am stuck because the DuckDBDataReader class has an overridden method called GetSchemaTable which does not really give the information that DBCommandBuilder needs to create insert, etc., commands. Specifically, the field lengths and key field info is not placed in the schema table. I think you'd have to parse the select command to get the table name and then run the Describe command to extract the information needed (or use some other API call).
I'm providing this information (and my work so far) in case you decide to try to finish the work yourself. I don't feel confident enough with the database to fix GetSchemaTable myself. It is great that you have lots of the standard ADO.Net classes working; just adding a couple more like CommandBuilder and DataAdapter would provide much better functionality. Most of the hard work is already done in the System.Data.Common classes (as you know).
One other thing: in DuckDB when you set a query parameter name, all other providers I use (SQLite, SQL Server, Oracle, MySQL, etc.) are forgiving if you include the SQL prefix when defining the parameters (e.g., you can pass $PARM1 as the parameter name) and it works OK, however DuckDB requires that the name exclude the prefix (e.g., PARM1). It was easy to fix my code, but you might want to consider this.
from duckdb.net.
Thanks for investigation @lloydchriswilson. Can you send a PR for the parameter prefix issue?
from duckdb.net.
Related Issues (20)
- EF Core Integration
- Install MySQL extension download link error HOT 10
- Invalid Input Error statement parameter name of chinese HOT 1
- Named parameters throw AccessViolationException when debugging HOT 20
- DuckDBConnectionStringBuilder threw an exception HOT 4
- Add possibility to append byte[] HOT 2
- Binder Error: No function matches the given name and argument types '@(DATE)'. You might need to add explicit type casts. HOT 3
- Support for arrays and UUID HOT 3
- DuckDBOpen failed: IO Error: File is already open HOT 2
- Performance issue relative to other access methods HOT 19
- Add support for composite types to Appender HOT 1
- Unable to load shared library 'duckdb' or one of its dependencies HOT 2
- version 1.0 Binder Error: Referenced column "x" not found in FROM clause! HOT 4
- Making use of `LibraryImport` to reduce marshalling, smaller optimizations HOT 3
- Parameters problem HOT 2
- Can't use unicode for connectionstring HOT 3
- System.AccessViolationException when using Appender with arrays that contain null values HOT 6
- Should the `RuntimeIdentifiers` property `osx` change to `osx-x64`? HOT 5
- Parameter names HOT 2
- Add support for Cancel Command HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from duckdb.net.