Comments (4)
Yes, this is currently not supported. Would you agree with the following behavior?
Python 2:
Reading:
- DB
SQL_VARBINARY
-> Pythonstr
- DB
SQL_VARCHAR
-> Pythonunicode
Writing: - Python
str
|unicode
->SQL_VARCHAR
Python 3:
Reading:
- DB
SQL_VARBINARY
-> Pythonbytes
- DB
SQL_VARCHAR
-> Pythonstr
Writing: - Python
str
->SQL_VARCHAR
- Python
bytes
->SQL_VARBINARY
from turbodbc.
For Python 3 that definitely makes sense.
On Python 2 I don't have any strong opinion.
Since turbodbc does not currently use unicode, it is probably best to keep everything str
.
But perhaps with the new prefer_unicode
option consider returning unicode
for SQL_VARCHAR
.
Not sure if it would be a good idea to write str
as SQL_VARBINARY
with prefer_unicode
, might be confusing.
from turbodbc.
Well, turbodbc already supports Unicode, just via the UTF-8 path ;-). I have corrected it above.
from turbodbc.
@MathMagique do you have an example of how to add support for a new data type? E.g. a pull request that was merged, in which this was done?
I just want to see if it is something I could take on because lack of binary support is a blocker for my adoption. I don't want to have to modify queries to do conversion.
from turbodbc.
Related Issues (20)
- Arrow support doesn't work in 3.10 with pyarrow-9.0.0/10.0.1 on Ubuntu 22.04
- 4..5.10 produces ImportError with pyarrow-11.0.0 and Python 3.10 on Linux-x86_64 HOT 4
- Issues Parsing Multiple Result Sets HOT 2
- To build turbodbc with arrow support with pyarrow 12.0.0
- Add pyarrow 12.0.0 support
- How to set pre-connect connection attributes? HOT 1
- Advanced use: Arrow 'double' type as supported dtype -> is not a pyarrow dtype? HOT 1
- Using more than 2 threads
- How to deal with Snowflake string length reporting HOT 2
- turbodbc does not play well with poetry HOT 6
- Support pyarrow=14.0.1 HOT 2
- Does turbodbc still need boost as a dependency?
- executemany does not execute sql statement HOT 3
- release 4.10.1 broke pip/poetry installation because of missing dependency. HOT 6
- Can't resolve correct pyarrow verision with pip and pyproject.toml
- Numpy version issue when installing turbodbc
- 4.11.0 Installation error: fatal error C1083: Cannot open include file: 'simdutf.h': No such file or directory HOT 6
- Return pyarrow.RecordBatchReader from cursor.fetcharrowbatches
- Turbodbc + pyarrow installation issue HOT 6
- Support downloading off git/archive HOT 1
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 turbodbc.