ruby-informix 0.6.2 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYRIGHT +1 -1
- data/Changelog +43 -0
- data/README +117 -56
- data/{extconf.rb → ext/extconf.rb} +2 -2
- data/{informix.c → ext/informixc.c} +1242 -1745
- data/{informix.ec → ext/informixc.ec} +722 -1276
- data/lib/informix.rb +380 -0
- data/lib/informix/exceptions.rb +161 -0
- data/lib/informix/interval.rb +280 -0
- data/lib/informix/scrollcursor.rb +306 -0
- data/lib/informix/seqcursor.rb +169 -0
- data/test/ifx_all.rb +31 -0
- data/test/ifx_test_create_table.rb +26 -0
- data/test/ifx_test_errinfo.rb +37 -0
- data/test/ifx_test_exceptions.rb +71 -0
- data/test/ifx_test_fetch_n_each.rb +64 -0
- data/test/ifx_test_insert.rb +27 -0
- data/test/ifx_test_select.rb +87 -0
- data/test/testcase.rb +166 -0
- metadata +32 -14
- data/ifx_assert.h +0 -45
- data/ifx_except.c +0 -522
- data/ifx_except.ec +0 -466
- data/ifx_except.h +0 -82
data/ifx_except.h
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
/* $Id: ifx_except.h,v 1.1 2007/01/31 02:16:32 santana Exp $ */
|
2
|
-
/*
|
3
|
-
* Copyright (c) 2006, 2007 Edwin M. Fine <efine@finecomputerconsultants.com>
|
4
|
-
* All rights reserved.
|
5
|
-
*
|
6
|
-
* Redistribution and use in source and binary forms, with or without
|
7
|
-
* modification, are permitted provided that the following conditions
|
8
|
-
* are met:
|
9
|
-
*
|
10
|
-
* 1. Redistributions of source code must retain the above copyright
|
11
|
-
* notice, this list of conditions and the following disclaimer.
|
12
|
-
* 2. Redistributions in binary form must reproduce the above copyright
|
13
|
-
* notice, this list of conditions and the following disclaimer in the
|
14
|
-
* documentation and/or other materials provided with the distribution.
|
15
|
-
* 3. The name of the author may not be used to endorse or promote products
|
16
|
-
* derived from this software without specific prior written permission.
|
17
|
-
*
|
18
|
-
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
19
|
-
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
20
|
-
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
21
|
-
* DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
|
22
|
-
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
23
|
-
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
24
|
-
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
25
|
-
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
26
|
-
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
27
|
-
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
28
|
-
* POSSIBILITY OF SUCH DAMAGE.
|
29
|
-
*/
|
30
|
-
|
31
|
-
#if !defined(IFX_EXCEPT_H_INCLUDED)
|
32
|
-
#define IFX_EXCEPT_H_INCLUDED
|
33
|
-
|
34
|
-
#include <ruby.h>
|
35
|
-
|
36
|
-
typedef struct ifx_except_symbols_t {
|
37
|
-
VALUE mInformix;
|
38
|
-
VALUE sExcInfo;
|
39
|
-
|
40
|
-
VALUE eError;
|
41
|
-
VALUE eInterfaceError;
|
42
|
-
VALUE eDatabaseError;
|
43
|
-
VALUE eDataError;
|
44
|
-
VALUE eOperationalError;
|
45
|
-
VALUE eIntegrityError;
|
46
|
-
VALUE eInternalError;
|
47
|
-
VALUE eProgrammingError;
|
48
|
-
VALUE eNotSupportedError;
|
49
|
-
VALUE eWarning;
|
50
|
-
|
51
|
-
VALUE lib_eAssertion;
|
52
|
-
|
53
|
-
/* Symbols for the ErrorInfo struct */
|
54
|
-
ID id_sql_code;
|
55
|
-
ID id_sql_state;
|
56
|
-
ID id_class_origin;
|
57
|
-
ID id_subclass_origin;
|
58
|
-
ID id_message;
|
59
|
-
ID id_server_name;
|
60
|
-
ID id_connection_name;
|
61
|
-
} ifx_except_symbols_t;
|
62
|
-
|
63
|
-
/**
|
64
|
-
* Initializes this module. MUST be called from within
|
65
|
-
* Informix_init(). If syms is not null, the struct it points
|
66
|
-
* to will be set to the value of the corresponding symbols.
|
67
|
-
*/
|
68
|
-
void rbifx_except_init(VALUE mInformix, ifx_except_symbols_t *syms);
|
69
|
-
|
70
|
-
/**
|
71
|
-
* Creates and returns an instance of any class derived from
|
72
|
-
* Informix::Error or Informix::Warning, using extended data from
|
73
|
-
* the SQL GET DIAGNOSTICS statement.
|
74
|
-
*/
|
75
|
-
VALUE rbifx_ext_exception(VALUE exception_class);
|
76
|
-
|
77
|
-
/**
|
78
|
-
* Raises an error with extended GET DIAGNOSTICS information
|
79
|
-
*/
|
80
|
-
void raise_ifx_extended(void); /* Raises Informix::DatabaseError */
|
81
|
-
|
82
|
-
#endif
|