Fixing failing tests in join test module
[csql.git] / examples / jdbc / README
blobfb00130dffb93b5d6c5e39ed4f64d00ce70215a8
1 ----------------------------------README---------------------------------------
2 This contains an example program that demonstates usage of jdbc interface.
4 What it does?
5 -------------
6 It creates table T1 with two fields f1 integer and f2 string.
7 Creates index on f1 field of T1 table.
8 Inserts 10 rows into the table T1, 1 insert per transaction
9 Update all rows where f1 field have even numbers
10 Delete all rows where f1 value is 0,3,6,9
11 Select rows with f1 value 0 to 9 and displays
12 Drop the table
14 How to compile
15 --------------
16 1. Make a copy of this directory in a writable area
17 2. Edit the Makefile and set the JAVAC variable to point to the javac
18    compiler on your system.
19 3. Use the make command to compile
20         $make
22 How to run
23 ----------
24 1. Set the necessary enviroment variables using the setup script
25    under the csql root directory
26         $. ./setupenv.ksh
28 2. Run the class file created by make
29         $java jdbcexample
31 Note: For running gateway example , makesure that you configure csql.conf and csqltable.conf with appropriate values. Add 1:t1 in the csqltable.conf and create table t1 in MySQL using isql tool as follows
32 $isql myodbc3
33 SQL>CREATE TABLE t1 (f1 integer, f2 char (196), primary key(f1));
34 and then run 
35         $java gwexample
36 Refer usermanual for more information on how to configure caching for MySQL.
38 Output of example:
39 ------------------
40 Table t1 created
41 Index created on T1 (f1) 
42 Total Rows inserted 10
43 Total Rows updated 5
44 Total Rows deleted 4
45 Tuple value is 1 101
46 Tuple value is 2 202
47 Tuple value is 4 204
48 Tuple value is 5 105
49 Tuple value is 7 107
50 Tuple value is 8 208
51 Total Rows selected 6
52 Dropped table T1