[DB-SIG] Sybase module 0.10 released

Dave Cole djc@object-craft.com.au
22 Dec 2000 16:13:42 +1100


What is it:

The Sybase module provides a Python interface to the Sybase relational
database system. The Sybase package supports almost all of the Python
Database API, version 2.0 with extensions.

The module works with Python versions 1.5.2 and later and Sybase
versions 11.0.3 and later.  It is based on the Sybase Client Library
(ct_* API), and the Bulk-Library Client (blk_* API) interfaces.

Changes:

- The numeric object has been reimplemented using the
  cs_convert/cs_calc/cs_cmp API.  This has improved the coerce
  behaviour over the previous release.

>>> import Sybase
>>> n = Sybase.numeric(100200300400500L)
>>> n / 12.3456
8116276276608.6702954898911353032659409020
>>> n / Sybase.numeric('12.3456')
8116276276608.67029548989113530326
>>> n.precision, n.scale
(15, 0)
>>> n + 12.3456
100200300400512.345600000000
>>> n + Sybase.numeric('12.3456')
100200300400512.3456
>>> n.precision, n.scale
(15, 0)

  You can also specify a precision and scale in the constructor.

>>> m = Sybase.numeric(n, 30, 2)
>>> m
100200300400500.00
>>> m.precision, m.scale
(30, 2)

Where can you get it:

        http://www.object-craft.com.au/projects/sybase/

- Dave

-- 
http://www.object-craft.com.au