Ecosyste.ms: Packages

An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 2.9% on proxy.golang.org
Top 1.0% dependent packages on proxy.golang.org
Top 0.8% dependent repos on proxy.golang.org
Top 6.4% forks on proxy.golang.org
Top 0.7% docker downloads on proxy.golang.org

proxy.golang.org : github.com/thda/tds

Package tds is a pure Go Sybase ASE/IQ/RS driver for the database/sql package. This is a beta release. This driver has yet to be battle tested on production workload. Version 1.0 will be released when this driver will be production ready Requirements Package installation is done via go-get: It implements most of the database/sql functionalities. To connect to a sybase instance, import the package and use the regular database/sql APIs: The connection string is pretty standard and uses the URL format: The most common ones are: Less frequently used ones: Most of the database/sql APIs are implemented, with a major one missing: named parameters. Please use the question mark '?' as a placeholder for parameters : Almost all of the sybase ASE datatypes are supported, with the exception of lob locators. The type mapping between the server and the go data types is as follows: decimal/numeric/money/smallmoney data can be given as parameters using any of the go numerical types. However one should never use float64 if a loss of precision is not tolerated. To implement precise floating point numbers, this driver provides a "Num" datatype, which is a wrapper around big.Rat. It implements the value.Scanner interface, you can thus instanciate it this way: To access the underlying big.Rat: Num also implements the stringer interface to pretty print its value. Please refer to the tds.Num godoc for more information. This driver assumes by default that the client uses utf8 strings and will ask the server to convert back and forth to/from this charset. If utf8 charset conversion is not supported on the server, and if the charset conversion is not supported by golang.org/x/text/encoding, you can add client-side character set conversion with the following code: You will have to handle it yourself and use a charset supported by the server. One can set a custom error callback to process server errors before the regular error processing routing. This allows handling showplan messages and print statement. The following demonstrates how to handle showplan and print messages: As of now the driver does not support bulk insert and named parameters. Password encryption only works for Sybase ASE > 15.5. You can use stmt_test.go and session_test.go for sample usage, as follows: Credits

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/thda/tds
Keywords: driver, sybase, tds
License: BSD-3-Clause
Latest release: over 4 years ago
First release: over 5 years ago
Namespace: github.com/thda
Dependent packages: 25
Dependent repositories: 49
Stars: 54 on GitHub
Forks: 10 on GitHub
Docker dependents: 4
Docker downloads: 206,836
See more repository details: repos.ecosyste.ms
Last synced: 22 days ago

    Loading...
    Readme
    Loading...