ruby-odbc 0.99997 → 0.99998

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,6 +1,11 @@
1
1
  ODBC binding for Ruby
2
2
  ---------------------
3
3
 
4
+ Wed Feb 15 2017 version 0.99998 released
5
+
6
+ * minor update to compile with Ruby 2.4, thangs to Kevin Deisz
7
+ * preset output vars before SQLColAttributes() call
8
+
4
9
  Wed Apr 15 2015 version 0.99997 released
5
10
 
6
11
  * fixed bug (typo) when compiling with Ruby < 2.0
data/README CHANGED
@@ -1,6 +1,6 @@
1
- # $Id: README,v 1.44 2015/04/15 13:58:39 chw Exp chw $
1
+ # $Id: README,v 1.45 2017/02/15 10:03:36 chw Exp chw $
2
2
 
3
- ruby-odbc-0.99997
3
+ ruby-odbc-0.99998
4
4
 
5
5
  This is an ODBC binding for Ruby. So far it has been tested with
6
6
 
@@ -20,6 +20,8 @@ This is an ODBC binding for Ruby. So far it has been tested with
20
20
 
21
21
  - Ruby 2.0.0, SQLite/ODBC >= 0.93, unixODBC 2.2.14 on Ubuntu 12.04 x86
22
22
 
23
+ - Ruby 2.4
24
+
23
25
  Michael Neumann <neumann@s-direktnet.de> and
24
26
  Will Merrell <wmerrell@catalystcorp.com> reported successful compilation
25
27
  with Cygwin on Win32.
@@ -27,7 +27,7 @@
27
27
  <body>
28
28
  <h1><a name="reference">Ruby ODBC Reference</a></h1>
29
29
  <div class = "lastmodifed">
30
- Last update: Wed, 13 March 2013
30
+ Last update: Wed, 15 February 2017
31
31
  </div>
32
32
  <hr>
33
33
  <div>
data/ext/odbc.c CHANGED
@@ -8,7 +8,7 @@
8
8
  * and redistribution of this file and for a
9
9
  * DISCLAIMER OF ALL WARRANTIES.
10
10
  *
11
- * $Id: odbc.c,v 1.77 2015/04/15 06:03:11 chw Exp chw $
11
+ * $Id: odbc.c,v 1.78 2017/02/15 10:04:30 chw Exp chw $
12
12
  */
13
13
 
14
14
  #undef ODBCVER
@@ -4123,10 +4123,10 @@ make_coltypes(SQLHSTMT hstmt, int ncols, char **msgp)
4123
4123
  {
4124
4124
  int i;
4125
4125
  COLTYPE *ret = NULL;
4126
- SQLLEN type, size = 0;
4127
4126
 
4128
4127
  for (i = 0; i < ncols; i++) {
4129
4128
  SQLUSMALLINT ic = i + 1;
4129
+ SQLLEN type = SQL_UNKNOWN_TYPE, size = 0;
4130
4130
 
4131
4131
  if (!succeeded(SQL_NULL_HENV, SQL_NULL_HDBC, hstmt,
4132
4132
  SQLColAttributes(hstmt, ic,
@@ -4152,6 +4152,7 @@ make_coltypes(SQLHSTMT hstmt, int ncols, char **msgp)
4152
4152
  }
4153
4153
  for (i = 0; i < ncols; i++) {
4154
4154
  SQLUSMALLINT ic = i + 1;
4155
+ SQLLEN type = SQL_UNKNOWN_TYPE, size = 0;
4155
4156
 
4156
4157
  callsql(SQL_NULL_HENV, SQL_NULL_HDBC, hstmt,
4157
4158
  SQLColAttributes(hstmt, ic,
@@ -4509,7 +4510,7 @@ make_column(SQLHSTMT hstmt, int i, int upc, int use_scn)
4509
4510
  {
4510
4511
  VALUE obj, v;
4511
4512
  SQLUSMALLINT ic = i + 1;
4512
- SQLLEN iv = 0;
4513
+ SQLLEN iv;
4513
4514
  #ifdef UNICODE
4514
4515
  SQLWCHAR name[SQL_MAX_MESSAGE_LENGTH];
4515
4516
  #else
@@ -4581,6 +4582,7 @@ make_column(SQLHSTMT hstmt, int i, int upc, int use_scn)
4581
4582
  #endif
4582
4583
  }
4583
4584
  rb_iv_set(obj, "@table", v);
4585
+ iv = SQL_UNKNOWN_TYPE;
4584
4586
  if (succeeded(SQL_NULL_HENV, SQL_NULL_HDBC, hstmt,
4585
4587
  SQLColAttributes(hstmt, ic, SQL_COLUMN_TYPE, NULL,
4586
4588
  0, NULL, &iv),
@@ -4591,6 +4593,7 @@ make_column(SQLHSTMT hstmt, int i, int upc, int use_scn)
4591
4593
  }
4592
4594
  rb_iv_set(obj, "@type", v);
4593
4595
  v = Qnil;
4596
+ iv = 0;
4594
4597
  if (succeeded(SQL_NULL_HENV, SQL_NULL_HDBC, hstmt,
4595
4598
  SQLColAttributes(hstmt, ic,
4596
4599
  #if (ODBCVER >= 0x0300)
@@ -4616,6 +4619,7 @@ make_column(SQLHSTMT hstmt, int i, int upc, int use_scn)
4616
4619
  }
4617
4620
  rb_iv_set(obj, "@length", v);
4618
4621
  v = Qnil;
4622
+ iv = SQL_NO_NULLS;
4619
4623
  if (succeeded(SQL_NULL_HENV, SQL_NULL_HDBC, hstmt,
4620
4624
  SQLColAttributes(hstmt, ic, SQL_COLUMN_NULLABLE, NULL,
4621
4625
  0, NULL, &iv),
@@ -4624,6 +4628,7 @@ make_column(SQLHSTMT hstmt, int i, int upc, int use_scn)
4624
4628
  }
4625
4629
  rb_iv_set(obj, "@nullable", v);
4626
4630
  v = Qnil;
4631
+ iv = 0;
4627
4632
  if (succeeded(SQL_NULL_HENV, SQL_NULL_HDBC, hstmt,
4628
4633
  SQLColAttributes(hstmt, ic, SQL_COLUMN_SCALE, NULL,
4629
4634
  0, NULL, &iv),
@@ -4632,6 +4637,7 @@ make_column(SQLHSTMT hstmt, int i, int upc, int use_scn)
4632
4637
  }
4633
4638
  rb_iv_set(obj, "@scale", v);
4634
4639
  v = Qnil;
4640
+ iv = 0;
4635
4641
  if (succeeded(SQL_NULL_HENV, SQL_NULL_HDBC, hstmt,
4636
4642
  SQLColAttributes(hstmt, ic, SQL_COLUMN_PRECISION, NULL,
4637
4643
  0, NULL, &iv),
@@ -4640,23 +4646,26 @@ make_column(SQLHSTMT hstmt, int i, int upc, int use_scn)
4640
4646
  }
4641
4647
  rb_iv_set(obj, "@precision", v);
4642
4648
  v = Qnil;
4649
+ iv = SQL_UNSEARCHABLE;
4643
4650
  if (succeeded(SQL_NULL_HENV, SQL_NULL_HDBC, hstmt,
4644
4651
  SQLColAttributes(hstmt, ic, SQL_COLUMN_SEARCHABLE, NULL,
4645
4652
  0, NULL, &iv),
4646
4653
  NULL, "SQLColAttributes(SQL_COLUMN_SEARCHABLE)")) {
4647
- v = (iv == SQL_NO_NULLS) ? Qfalse : Qtrue;
4654
+ v = (iv == SQL_UNSEARCHABLE) ? Qfalse : Qtrue;
4648
4655
  }
4649
4656
  rb_iv_set(obj, "@searchable", v);
4650
4657
  v = Qnil;
4658
+ iv = SQL_FALSE;
4651
4659
  if (succeeded(SQL_NULL_HENV, SQL_NULL_HDBC, hstmt,
4652
4660
  SQLColAttributes(hstmt, ic, SQL_COLUMN_UNSIGNED, NULL,
4653
4661
  0, NULL, &iv),
4654
4662
  NULL, "SQLColAttributes(SQL_COLUMN_UNSIGNED)")) {
4655
- v = (iv == SQL_NO_NULLS) ? Qfalse : Qtrue;
4663
+ v = (iv == SQL_FALSE) ? Qfalse : Qtrue;
4656
4664
  }
4657
4665
  rb_iv_set(obj, "@unsigned", v);
4658
4666
  v = Qnil;
4659
4667
  #ifdef SQL_COLUMN_AUTO_INCREMENT
4668
+ iv = SQL_FALSE;
4660
4669
  if (succeeded(SQL_NULL_HENV, SQL_NULL_HDBC, hstmt,
4661
4670
  SQLColAttributes(hstmt, ic, SQL_COLUMN_AUTO_INCREMENT, NULL,
4662
4671
  0, NULL, &iv),
@@ -5220,12 +5229,16 @@ do_option(int argc, VALUE *argv, VALUE self, int isstmt, int op)
5220
5229
  {
5221
5230
  DBC *p = NULL;
5222
5231
  STMT *q = NULL;
5223
- VALUE val, val2, vstr;
5232
+ VALUE val, val2 = Qnil;
5224
5233
  SQLINTEGER v;
5225
5234
  char *msg;
5226
5235
  int level = isstmt ? OPT_LEVEL_STMT : OPT_LEVEL_DBC;
5227
5236
 
5228
- rb_scan_args(argc, argv, (op == -1) ? "11" : "01", &val, &val2);
5237
+ if (op == -1) {
5238
+ rb_scan_args(argc, argv, "11", &val, &val2);
5239
+ } else {
5240
+ rb_scan_args(argc, argv, "01", &val);
5241
+ }
5229
5242
  if (isstmt) {
5230
5243
  Data_Get_Struct(self, STMT, q);
5231
5244
  if (q->dbc == Qnil) {
@@ -5241,6 +5254,7 @@ do_option(int argc, VALUE *argv, VALUE self, int isstmt, int op)
5241
5254
  }
5242
5255
  }
5243
5256
  if (op == -1) {
5257
+ VALUE vstr;
5244
5258
  char *string;
5245
5259
  int i, op_found = 0;
5246
5260
 
@@ -1,7 +1,7 @@
1
1
  require 'date'
2
2
  spec = Gem::Specification.new do |s|
3
3
  s.name = "ruby-odbc"
4
- s.version = "0.99997"
4
+ s.version = "0.99998"
5
5
  s.date = Date.today.to_s
6
6
  s.author = "Christian Werner"
7
7
  s.email = "chw @nospam@ ch-werner.de"
@@ -1,4 +1,4 @@
1
- $q = $c.prepare("select id,str from test")
1
+ $q = $c.prepare("select id,str from test order by id")
2
2
 
3
3
  if $q.column(0).name.upcase != "ID" then raise "fetch failed" end
4
4
  if $q.column(1).name.upcase != "STR" then raise "fetch failed" end
metadata CHANGED
@@ -1,14 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-odbc
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.99997'
4
+ version: '0.99998'
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Christian Werner
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2015-04-17 00:00:00.000000000 Z
12
+ date: 2017-02-15 00:00:00.000000000 Z
12
13
  dependencies: []
13
14
  description:
14
15
  email: chw @nospam@ ch-werner.de
@@ -24,51 +25,53 @@ extra_rdoc_files:
24
25
  - doc/odbc.html
25
26
  files:
26
27
  - COPYING
27
- - ChangeLog
28
- - GPL
29
- - MANIFEST
30
- - README
31
- - doc/odbc.html
32
- - ext/extconf.rb
33
- - ext/init.c
34
28
  - ext/odbc.c
29
+ - ext/utf8/odbc.c
35
30
  - ext/utf8/extconf.rb
36
31
  - ext/utf8/init.c
37
- - ext/utf8/odbc.c
38
- - lib/cqgen.rb
32
+ - ext/extconf.rb
33
+ - ext/init.c
39
34
  - ruby-odbc.gemspec
40
- - test/00connect.rb
35
+ - README
36
+ - lib/cqgen.rb
37
+ - MANIFEST
38
+ - GPL
39
+ - ChangeLog
40
+ - doc/odbc.html
41
+ - ruby-odbc-0.99998.gem
42
+ - test/40update.rb
41
43
  - test/10create_table.rb
44
+ - test/70close.rb
45
+ - test/00connect.rb
42
46
  - test/20insert.rb
43
- - test/30select.rb
44
- - test/40update.rb
45
47
  - test/45delete.rb
48
+ - test/utf8/test.rb
46
49
  - test/50drop_table.rb
47
- - test/70close.rb
50
+ - test/30select.rb
48
51
  - test/test.rb
49
- - test/utf8/test.rb
50
52
  homepage: http://www.ch-werner.de/rubyodbc
51
53
  licenses: []
52
- metadata: {}
53
54
  post_install_message:
54
55
  rdoc_options: []
55
56
  require_paths:
56
57
  - lib
57
58
  - lib
58
59
  required_ruby_version: !ruby/object:Gem::Requirement
60
+ none: false
59
61
  requirements:
60
- - - ">="
62
+ - - ! '>='
61
63
  - !ruby/object:Gem::Version
62
64
  version: '0'
63
65
  required_rubygems_version: !ruby/object:Gem::Requirement
66
+ none: false
64
67
  requirements:
65
- - - ">="
68
+ - - ! '>='
66
69
  - !ruby/object:Gem::Version
67
70
  version: '0'
68
71
  requirements: []
69
72
  rubyforge_project:
70
- rubygems_version: 2.4.5
73
+ rubygems_version: 1.8.23
71
74
  signing_key:
72
- specification_version: 4
75
+ specification_version: 3
73
76
  summary: ODBC binding for Ruby
74
77
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: fe13750acbbaeb8c33adb7af778eaba01174229d
4
- data.tar.gz: ab8d5d5837ea84f4dca124994e4db2fdb3cc1c24
5
- SHA512:
6
- metadata.gz: 99ac5be18b63d180ca059fde5808d654c60f8d4e014ec4903778c56830da517d38f23b63861a91dedde012a3e71b170c6a33bcd18ae70ab1dbc811d25b58a952
7
- data.tar.gz: ce00b6f94cbc7296f20871853cff5295be26ea9a5b7b39093bf4ba7b36811d932ccc9bcd246014558288adb6aa8f781dcd7c4fed03362e68f48b64f29a1eee70