-
Notifications
You must be signed in to change notification settings - Fork 0
A ruby implementation of the client side of the Peasys technology
dips400/peasys-ruby
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
# Peasys Ruby Library The Peasys Ruby library provides convenient access to the Peasys service from applications written in the Ruby language. It includes a pre-defined set of classes and functions for connection and sql query execution on the DB2. ## Documentation See the [Ruby docs](https://dips400.com/docs). ## Installation You don't need this source code unless you want to modify the gem. If you just want to use the package, just run: ```sh gem install peasys ``` If you want to build the gem from source: ```sh gem build peasys-ruby.gemspec ``` ## Usage For a comprehensive list of examples, check out the [documentation](https://dips400.com/docs). ### Connexion Peasys is a tool used along a license that should be found on the dips400 website. This license key along with the client ID are required for the use of the service Peasys. ```ruby require "peasys" conn = PeaClient.new("DNS_OR_IP", "PARTITION_NAME", PORT, "USERNAME", "PASSWORD", "ID_CLIENT", true, false) puts conn.connexion_message conn.disconnect ``` ### Query the Db2 For example, use the executeCreate method of the PeaClient class in order to create a a new table in the database. ```ruby PeaCreateResponse createResponse = conn.execute_create("CREATE TABLE schema_name/table_name (name CHAR(10), age INT)"); puts createResponse.sql_message puts createResponse.sql_state ``` ### Deconnexion It is important to always disconnect from the server after you used the connexion. ```ruby conn.disconnect ``` ## Support New features and bug fixes are released on the latest major version of the Peasys Ruby library. If you are on an older major version, we recommend that you upgrade to the latest in order to use the new features and bug fixes including those for security vulnerabilities. Older major versions of the package will continue to be available for use, but will not be receiving any updates.
About
A ruby implementation of the client side of the Peasys technology
Topics
Resources
Stars
Watchers
Forks
Packages 0
No packages published