Coder Social home page Coder Social logo

Numpy support about turbodbc HOT 3 CLOSED

blue-yonder avatar blue-yonder commented on June 1, 2024 1
Numpy support

from turbodbc.

Comments (3)

MathMagique avatar MathMagique commented on June 1, 2024 2

Released with turbodbc 0.4.0

from turbodbc.

MathMagique avatar MathMagique commented on June 1, 2024

This requires a major rework of the result set class and others. Key idea for the new design:

  • query allows to get current result_set
  • A result_set is rather basic. It creates the required buffers, binds them to the columns, and implements batched access with something like next_batch(). Also provides access to the raw multi_value_buffers
  • A row_based_result_set is based on a result_set and takes care of handling the row concept. Grants access to raw memory in terms of buffer_elements
  • A cpp_row_based_result_set is based on a row_based_result_set and adds conversion from SQL data type to turbodbc::field.

Above components merely shift the responsibilities around without creating new user value. Below components can be added to implement new features:

  • A py_row_based_result_set is based on row_based_result_set and replaces the SQL data type -> turbodbc::field -> Python type conversion with a direct hop from SQL data type -> Python type. Should improve performance a little.
  • A numpy_based_result_set is based on the plain result_set and contains specialized routines for copying entire chunks of memory without creating individual C++ or Python objects.

from turbodbc.

MathMagique avatar MathMagique commented on June 1, 2024

Found a way to make numpy support both available and purely optional, so folks can still use turbodbc without having to install and compile numpy first.

from turbodbc.

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.