Giter VIP home page Giter VIP logo

Comments (5)

marcboeker avatar marcboeker commented on June 29, 2024 2

I've reopened this and requested an ExtractStatements function for the C API. See duckdb/duckdb#4977

from go-duckdb.

marcboeker avatar marcboeker commented on June 29, 2024

Thanks for reporting this. I've tested multiple statements with other DuckDB drivers (Rust, Python).
The Python driver uses a very clever way of splitting a string of multiple statements into single statements and executing them one by one. They make use of the ExtractStatements method in the C++ API.
Maybe we can leverage this?

Until we have a fix, I would suggest to merge your quick fix. Could you please open a PR?

from go-duckdb.

begelundmuller avatar begelundmuller commented on June 29, 2024

Yeah, I noticed the ExtractStatements method in the Python driver as well, unfortunately I was not able to find it in the C API. If you can't find it, do you think it makes sense to request DuckDB to add it?

I submitted a PR for my fix, but please beware that I put it together very quickly, so please double-check it before merging.

from go-duckdb.

marcboeker avatar marcboeker commented on June 29, 2024

Thanks, I've tested and merged the PR.
I think we should request the ExtractStatements method for the C API, as this would be a cleaner solution. I'll ask them tomorrow.

from go-duckdb.

marcboeker avatar marcboeker commented on June 29, 2024

I think we can close this.

from go-duckdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.