tiny_tds 2.1.0.pre2 → 2.1.0.pre3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d2d676319d7afa209a0eaaf878ce2606fa275daf
4
- data.tar.gz: 12360c67d76881fa42f24f798b1e31f68828d534
3
+ metadata.gz: 5566589ac540ec491cbe2d0f81179f6d714405c2
4
+ data.tar.gz: 8ea41365b260d809a232f8b9c57ff73a8abb7b57
5
5
  SHA512:
6
- metadata.gz: 265e162c230eaedabae443fb8ca341999827d2af2633cc271a56a3c450bfd900c7bea31b97f2230affce62988932e519379791d43d738c134f435fb7544eb8cb
7
- data.tar.gz: 8fce1c49005186b3c322904be62068a6d8d910de43c689be2a28f574a76b5f3d374546b7bc28493f6648fcacb9dfc424b3b8caa980054d8198c7d3801c2a316f
6
+ metadata.gz: 217443bc1c04781d1939e0f1c6cf07b1c684eec870cabe8d9d578ea76014f63b0812b5ffb88b58f2832fedb72326c723e8999df49b5db5b2e1c4b8110f2af0e7
7
+ data.tar.gz: bf338a99275e6592cf4a166c7dad14f38d3c6782ecae0146b3822283c593c32f82b8cb5d97b66e550266b2a60e9071dc097264cda4a58c39437779600dcdcbc8
data/CHANGELOG.md CHANGED
@@ -3,6 +3,7 @@
3
3
  * Support RubyInstaller2 for Windows. Fixes #365.
4
4
  * Support the FREETDS_DIR environment variable. Fixes #371.
5
5
  * Rename binstubs to tsql-ttds and defncopy-ttds
6
+ * Support separate timeout values per connection Fixes #348.
6
7
 
7
8
 
8
9
  ## 2.0.0
data/README.md CHANGED
@@ -117,7 +117,7 @@ Creating a new client takes a hash of options. For valid iconv encoding options,
117
117
  * :appname - Short string seen in SQL Servers process/activity window.
118
118
  * :tds_version - TDS version. Defaults to "7.3".
119
119
  * :login_timeout - Seconds to wait for login. Default to 60 seconds.
120
- * :timeout - Seconds to wait for a response to a SQL command. Default 5 seconds.
120
+ * :timeout - Seconds to wait for a response to a SQL command. Default 5 seconds. Prior to 1.0rc5, FreeTDS was unable to set the timeout on a per-client basis, permitting only a global timeout value. This means that if you're using an older version, the timeout values for all clients will be overwritten each time you instantiate a new `TinyTds::Client` object. If you are using 1.0rc5 or later, all clients will have an independent timeout setting as you'd expect.
121
121
  * :encoding - Any valid iconv value like CP1251 or ISO-8859-1. Default UTF-8.
122
122
  * :azure - Pass true to signal that you are connecting to azure.
123
123
  * :contained - Pass true to signal that you are connecting with a contained database user.
@@ -482,5 +482,3 @@ My name is Ken Collins and I currently maintain the SQL Server adapter for Activ
482
482
  ## License
483
483
 
484
484
  TinyTDS is Copyright (c) 2010-2015 Ken Collins, <ken@metaskills.net> and Will Bond (Veracross LLC) <wbond@breuer.com>. It is distributed under the MIT license. Windows binaries contain pre-compiled versions of FreeTDS <http://www.freetds.org/> which is licensed under the GNU LGPL license at <http://www.gnu.org/licenses/lgpl-2.0.html>
485
-
486
-
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.0.pre2
1
+ 2.1.0.pre3
@@ -326,8 +326,6 @@ static VALUE rb_tinytds_connect(VALUE self, VALUE opts) {
326
326
  dbsetlapp(cwrap->login, StringValueCStr(app));
327
327
  if (!NIL_P(ltimeout))
328
328
  dbsetlogintime(NUM2INT(ltimeout));
329
- if (!NIL_P(timeout))
330
- dbsettime(NUM2INT(timeout));
331
329
  if (!NIL_P(charset))
332
330
  DBSETLCHARSET(cwrap->login, StringValueCStr(charset));
333
331
  if (!NIL_P(database)) {
@@ -354,12 +352,18 @@ static VALUE rb_tinytds_connect(VALUE self, VALUE opts) {
354
352
  #endif
355
353
  cwrap->client = dbopen(cwrap->login, StringValueCStr(dataserver));
356
354
  if (cwrap->client) {
357
- VALUE transposed_encoding;
355
+ VALUE transposed_encoding, timeout_string;
358
356
 
359
357
  cwrap->closed = 0;
360
358
  cwrap->charset = charset;
361
359
  if (!NIL_P(version))
362
360
  dbsetversion(NUM2INT(version));
361
+ if (!NIL_P(timeout)) {
362
+ timeout_string = rb_sprintf("%"PRIsVALUE"", timeout);
363
+ if (dbsetopt(cwrap->client, DBSETTIME, StringValueCStr(timeout_string), 0) == FAIL) {
364
+ dbsettime(NUM2INT(timeout));
365
+ }
366
+ }
363
367
  dbsetuserdata(cwrap->client, (BYTE*)cwrap->userdata);
364
368
  cwrap->userdata->closed = 0;
365
369
  if (!NIL_P(database) && (azure != Qtrue)) {
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tiny_tds
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0.pre2
4
+ version: 2.1.0.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ken Collins
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-09-04 00:00:00.000000000 Z
13
+ date: 2017-09-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: mini_portile2