Skip to content

Feature/issue 24 support the latest cython #29

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion proton_driver/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from .dbapi import connect


VERSION = (0, 2, 7)
VERSION = (0, 2, 9)
__version__ = '.'.join(str(x) for x in VERSION)

__all__ = ['Client', 'connect']
47 changes: 17 additions & 30 deletions proton_driver/bufferedreader.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 6 additions & 19 deletions proton_driver/bufferedwriter.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 25 additions & 10 deletions proton_driver/columns/intcolumn.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,11 @@ class LargeIntColumn(IntColumn):
format = 'Q' # We manually deal with sign in read/write.
factor = None

to_quads = None
from_quads = None
def to_quads(self, *args, **kwargs):
raise NotImplementedError

def from_quads(self, *args, **kwargs):
raise NotImplementedError

def write_items(self, items, buf):
n_items = len(items)
Expand All @@ -126,32 +129,44 @@ class Int128Column(LargeIntColumn):
int_size = 16
factor = 2

to_quads = int128_to_quads
from_quads = int128_from_quads
def to_quads(self, *args, **kwargs):
return int128_to_quads(*args, **kwargs)

def from_quads(self, *args, **kwargs):
return int128_from_quads(*args, **kwargs)


class UInt128Column(LargeIntColumn):
ch_type = 'uint128'
int_size = 16
factor = 2

to_quads = uint128_to_quads
from_quads = uint128_from_quads
def to_quads(self, *args, **kwargs):
return uint128_to_quads(*args, **kwargs)

def from_quads(self, *args, **kwargs):
return uint128_from_quads(*args, **kwargs)


class Int256Column(LargeIntColumn):
ch_type = 'int256'
int_size = 32
factor = 4

to_quads = int256_to_quads
from_quads = int256_from_quads
def to_quads(self, *args, **kwargs):
return int256_to_quads(*args, **kwargs)

def from_quads(self, *args, **kwargs):
return int256_from_quads(*args, **kwargs)


class UInt256Column(LargeIntColumn):
ch_type = 'uint256'
int_size = 32
factor = 4

to_quads = uint256_to_quads
from_quads = uint256_from_quads
def to_quads(self, *args, **kwargs):
return uint256_to_quads(*args, **kwargs)

def from_quads(self, *args, **kwargs):
return uint256_from_quads(*args, **kwargs)
Loading