sqlanywhere-ffi 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sql_anywhere_interface.rb +4 -1
- data/lib/sqlanywhere.rb +2 -0
- data/sqlanywhere-ffi.gemspec +21 -3
- data/test/sqlanywhere_test.rb +1 -1
- metadata +16 -16
- data/CHANGELOG +0 -34
- data/Gemfile +0 -3
@@ -18,7 +18,7 @@ class SQLAnywhere::SQLAnywhereInterface
|
|
18
18
|
attach_function :sqlany_connect, [:pointer, :string], :int
|
19
19
|
|
20
20
|
def sqlany_error(connection)
|
21
|
-
size =
|
21
|
+
size = 255
|
22
22
|
buffer = FFI::MemoryPointer.new(:char, size, false)
|
23
23
|
code = sqlany_error_ connection, buffer, size
|
24
24
|
return code, buffer.read_string
|
@@ -110,4 +110,7 @@ class SQLAnywhere::SQLAnywhereInterface
|
|
110
110
|
|
111
111
|
# http://dcx.sybase.com/1200/en/dbprogramming/programming-sacpp-sacapi-h-fil-sqlany-num-params-met.html
|
112
112
|
attach_function :sqlany_num_params, [:pointer], :int
|
113
|
+
|
114
|
+
# http://dcx.sybase.com/1200/en/dbprogramming/programming-sacpp-sacapi-h-fil-sqlany-affected-rows-met.html
|
115
|
+
attach_function :sqlany_affected_rows, [:pointer], :int
|
113
116
|
end
|
data/lib/sqlanywhere.rb
CHANGED
data/sqlanywhere-ffi.gemspec
CHANGED
@@ -2,19 +2,37 @@ Gem::Specification.new do |s|
|
|
2
2
|
s.name = "sqlanywhere-ffi"
|
3
3
|
s.summary = "A low-lever driver that allows Ruby code to interface with SQL Anywhere databases"
|
4
4
|
s.description = <<-DESCRIPTION
|
5
|
+
This library is meant to be compatible with the sqlanywhere gem.
|
6
|
+
The only difference should be that sqlanywhere-ffi doesn't return magic numbers, but instead uses symbols.
|
5
7
|
This library wraps the functionality provided by the SQL Anywhere DBCAPI library.
|
6
8
|
This driver is intended to be a base-level library to be used by interface libraries such as Ruby-DBI and ActiveRecord.
|
7
9
|
This driver can be used with SQL Anywhere 10 and later versions.
|
8
10
|
DESCRIPTION
|
9
|
-
s.version = "1.0.
|
11
|
+
s.version = "1.0.3"
|
10
12
|
s.author = "Chris Couzens"
|
11
13
|
s.email = "ccouzens@gmail.com"
|
12
|
-
s.files =
|
14
|
+
s.files = %w{
|
15
|
+
README.md
|
16
|
+
sqlanywhere-ffi.gemspec
|
17
|
+
lib/bind_param.rb
|
18
|
+
lib/sql_anywhere_interface.rb
|
19
|
+
lib/data_value.rb
|
20
|
+
lib/sqlanywhere.rb
|
21
|
+
lib/api.rb
|
22
|
+
lib/data_info.rb
|
23
|
+
lib/column_info.rb
|
24
|
+
lib/bind_param_info.rb
|
25
|
+
lib/bool.rb
|
26
|
+
test/test_iq.sql
|
27
|
+
test/test.sql
|
28
|
+
test/sqlanywhere_test.rb
|
29
|
+
LICENSE
|
30
|
+
}
|
13
31
|
s.executables = []
|
14
32
|
s.test_files = Dir["test/sqlanywhere_test.rb"]
|
15
33
|
s.has_rdoc = false
|
16
34
|
s.add_dependency 'ffi', '>= 1.3.1'
|
17
|
-
s.homepage = 'https://github.com/
|
35
|
+
s.homepage = 'https://github.com/ccouzens/sqlanywhere-ffi'
|
18
36
|
s.requirements = <<-REQUIREMENTS
|
19
37
|
DBCAPI should be installed.
|
20
38
|
http://www.sybase.co.uk/detail?id=1087327
|
data/test/sqlanywhere_test.rb
CHANGED
@@ -73,7 +73,7 @@ class SQLAnywhere_Test < Test::Unit::TestCase
|
|
73
73
|
end
|
74
74
|
@conn = @api.sqlany_new_connection()
|
75
75
|
assert_not_nil @conn
|
76
|
-
conn_str = "
|
76
|
+
conn_str = "eng=test;uid=dba;pwd=sql"
|
77
77
|
assert_succeeded @api.sqlany_connect(@conn, conn_str)
|
78
78
|
end
|
79
79
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqlanywhere-ffi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
12
|
+
date: 2013-01-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|
@@ -27,33 +27,33 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 1.3.1
|
30
|
-
description: ! " This library
|
31
|
-
|
32
|
-
|
33
|
-
|
30
|
+
description: ! " This library is meant to be compatible with the sqlanywhere gem.\n
|
31
|
+
\ The only difference should be that sqlanywhere-ffi doesn't return magic numbers,
|
32
|
+
but instead uses symbols.\n This library wraps the functionality provided by
|
33
|
+
the SQL Anywhere DBCAPI library.\n This driver is intended to be a base-level
|
34
|
+
library to be used by interface libraries such as Ruby-DBI and ActiveRecord.\n This
|
35
|
+
driver can be used with SQL Anywhere 10 and later versions.\n"
|
34
36
|
email: ccouzens@gmail.com
|
35
37
|
executables: []
|
36
38
|
extensions: []
|
37
39
|
extra_rdoc_files: []
|
38
40
|
files:
|
39
|
-
-
|
40
|
-
-
|
41
|
+
- README.md
|
42
|
+
- sqlanywhere-ffi.gemspec
|
41
43
|
- lib/bind_param.rb
|
42
|
-
- lib/sqlanywhere.rb
|
43
|
-
- lib/api.rb
|
44
44
|
- lib/sql_anywhere_interface.rb
|
45
45
|
- lib/data_value.rb
|
46
|
+
- lib/sqlanywhere.rb
|
47
|
+
- lib/api.rb
|
48
|
+
- lib/data_info.rb
|
49
|
+
- lib/column_info.rb
|
46
50
|
- lib/bind_param_info.rb
|
47
51
|
- lib/bool.rb
|
48
|
-
- lib/data_info.rb
|
49
|
-
- Gemfile
|
50
|
-
- README.md
|
51
|
-
- test/test.sql
|
52
52
|
- test/test_iq.sql
|
53
|
+
- test/test.sql
|
53
54
|
- test/sqlanywhere_test.rb
|
54
|
-
- sqlanywhere-ffi.gemspec
|
55
55
|
- LICENSE
|
56
|
-
homepage: https://github.com/
|
56
|
+
homepage: https://github.com/ccouzens/sqlanywhere-ffi
|
57
57
|
licenses: []
|
58
58
|
post_install_message:
|
59
59
|
rdoc_options: []
|
data/CHANGELOG
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
=CHANGE LOG
|
2
|
-
|
3
|
-
=====0.1.5 -- 2010/01/25
|
4
|
-
- Updated library to use DBCAPI 2.0
|
5
|
-
- Changed test suite to correctly test BIT and TINYINT types
|
6
|
-
- Added support for Ruby 1.9.1
|
7
|
-
|
8
|
-
=====0.1.4 -- 2009/03/25
|
9
|
-
- Changed Rakefile to automatically create lib directory
|
10
|
-
- Fixed bug that tried to build native extensions on binary distsributions
|
11
|
-
|
12
|
-
=====0.1.3 -- 2008/12/31
|
13
|
-
- Removed 'hint file' in lib directory
|
14
|
-
- Added extensions to gemspec to force a local compile
|
15
|
-
|
16
|
-
=====0.1.2 -- 2008/12/18
|
17
|
-
- Fixed bug when trying to read input value from OUTPUT parameter
|
18
|
-
- Added error checking to C2RB
|
19
|
-
- Fixed Rake to handle .bundle on OSX
|
20
|
-
|
21
|
-
=====0.1.1 -- 2008/11/06
|
22
|
-
- Created a source gem rake task
|
23
|
-
- Created a 'hint' file if the source gem is used directly
|
24
|
-
- Changed file permissions on archives
|
25
|
-
- Changed archives to be specific to platform (.zip on windows, .tar.gz
|
26
|
-
otherwise)
|
27
|
-
- Changed default rake task to only build library, not gem
|
28
|
-
- Added a gem rake task
|
29
|
-
|
30
|
-
=====0.1.0 -- 2008/10/15
|
31
|
-
- Initial Release
|
32
|
-
- Wraps DBCAPI functionality
|
33
|
-
- Includes a simple unit test suite
|
34
|
-
|
data/Gemfile
DELETED