sbf-do_sqlite3 0.10.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/ChangeLog.markdown +119 -0
- data/LICENSE +20 -0
- data/README.markdown +94 -0
- data/Rakefile +21 -0
- data/ext/do_sqlite3/compat.h +55 -0
- data/ext/do_sqlite3/do_common.c +510 -0
- data/ext/do_sqlite3/do_common.h +132 -0
- data/ext/do_sqlite3/do_sqlite3.c +448 -0
- data/ext/do_sqlite3/do_sqlite3.h +22 -0
- data/ext/do_sqlite3/do_sqlite3_extension.c +87 -0
- data/ext/do_sqlite3/error.h +85 -0
- data/ext/do_sqlite3/extconf.rb +26 -0
- data/lib/do_sqlite3/transaction.rb +21 -0
- data/lib/do_sqlite3/version.rb +5 -0
- data/lib/do_sqlite3.rb +13 -0
- data/spec/command_spec.rb +6 -0
- data/spec/connection_spec.rb +26 -0
- data/spec/encoding_spec.rb +7 -0
- data/spec/error/sql_error_spec.rb +7 -0
- data/spec/reader_spec.rb +6 -0
- data/spec/result_spec.rb +17 -0
- data/spec/spec_helper.rb +138 -0
- data/spec/typecast/array_spec.rb +6 -0
- data/spec/typecast/bigdecimal_spec.rb +9 -0
- data/spec/typecast/boolean_spec.rb +9 -0
- data/spec/typecast/byte_array_spec.rb +6 -0
- data/spec/typecast/class_spec.rb +6 -0
- data/spec/typecast/date_spec.rb +9 -0
- data/spec/typecast/datetime_spec.rb +9 -0
- data/spec/typecast/float_spec.rb +10 -0
- data/spec/typecast/integer_spec.rb +6 -0
- data/spec/typecast/nil_spec.rb +18 -0
- data/spec/typecast/other_spec.rb +6 -0
- data/spec/typecast/range_spec.rb +6 -0
- data/spec/typecast/string_spec.rb +6 -0
- data/spec/typecast/time_spec.rb +7 -0
- data/tasks/compile.rake +23 -0
- data/tasks/release.rake +14 -0
- data/tasks/retrieve.rake +16 -0
- data/tasks/spec.rake +10 -0
- metadata +100 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 93e77ffe1bd340c6e9cc68bd64f07cd6f50369cbe210ba0c2849d8a81f5a0e5d
|
4
|
+
data.tar.gz: d96c14f4361dc477ee0b1e11f8f700c24c4c5097f00dce7f99d67a03512b146c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f96eed84a64a072b0dc391c75f0d7c37151ebf9adcccf32efaa6cc3c672bc0b5c6d0173b2c3cae181fad0ee1026012f7ed79fca2173dbc65db9003f2a3fe59cc
|
7
|
+
data.tar.gz: ff14bea8455d2fbc4844cf2dc194866d5bbee87e46b66aaf995389390521a88b248e7a8968ed8100fa0b8949006910d8e5c6cada2172e85b6421ecd83a6df667
|
data/ChangeLog.markdown
ADDED
@@ -0,0 +1,119 @@
|
|
1
|
+
## 0.10.17 2016-01-24
|
2
|
+
|
3
|
+
No changes
|
4
|
+
|
5
|
+
## 0.10.16 2015-05-17
|
6
|
+
|
7
|
+
No changes
|
8
|
+
|
9
|
+
## 0.10.15 2015-02-15
|
10
|
+
|
11
|
+
* Ruby 2.2 support
|
12
|
+
* Windows support on 2.1.x and 2.2.x
|
13
|
+
|
14
|
+
## 0.10.14 2014-02-13
|
15
|
+
|
16
|
+
* Don't do DNS lookup in transaction loading
|
17
|
+
* Allow for subsecond timestamp parsing
|
18
|
+
|
19
|
+
## 0.10.13 2013-05-27
|
20
|
+
|
21
|
+
* Windows binary for Ruby 2.0
|
22
|
+
|
23
|
+
## 0.10.12 2013-01-21
|
24
|
+
|
25
|
+
* jdbc-sqlite3 driver loading fix
|
26
|
+
* Improve handling of floats / doubles in sqlite3 on JRuby
|
27
|
+
|
28
|
+
## 0.10.11 2012-12-29
|
29
|
+
|
30
|
+
* Rename C symbols to prevent name collitions
|
31
|
+
|
32
|
+
## 0.10.10 2012-10-11
|
33
|
+
|
34
|
+
* Add support to C driver for busy\_timeout
|
35
|
+
|
36
|
+
## 0.10.9 2012-08-13
|
37
|
+
|
38
|
+
* Fix segfault when loading custom extensions
|
39
|
+
|
40
|
+
## 0.10.8 2012-02-10
|
41
|
+
|
42
|
+
* Ruby 1.9.3 compatibility on Windows
|
43
|
+
* Fix issue with sqlite3_load_extension
|
44
|
+
|
45
|
+
## 0.10.7 2011-10-13
|
46
|
+
|
47
|
+
* Ruby 1.9.3 compatibility
|
48
|
+
|
49
|
+
## 0.10.6 2011-05-22
|
50
|
+
|
51
|
+
Bugfixes
|
52
|
+
* Fix an issue on some platforms when multiple DO drivers are loaded
|
53
|
+
|
54
|
+
## 0.10.5 2011-05-03
|
55
|
+
|
56
|
+
Bugfixes
|
57
|
+
* Fix an issue with DateTime
|
58
|
+
|
59
|
+
## 0.10.4 2011-04-28
|
60
|
+
|
61
|
+
New features
|
62
|
+
* Add save point to transactions (all)
|
63
|
+
* JRuby 1.9 mode support (encodings etc.)
|
64
|
+
|
65
|
+
Bugfixes
|
66
|
+
* Fix bug when using nested transactions in concurrent scenarios (all)
|
67
|
+
* Use column aliases instead of names (jruby)
|
68
|
+
* DST calculation fixes (all)
|
69
|
+
|
70
|
+
Other
|
71
|
+
* Refactor to DRY up the adapters (all)
|
72
|
+
* Many style fixes
|
73
|
+
* Switch back to RSpec
|
74
|
+
|
75
|
+
## 0.10.3 2011-01-30
|
76
|
+
* Reworked transactions
|
77
|
+
* Fix a DST bug that could cause datetimes in the wrong timezone
|
78
|
+
|
79
|
+
## 0.10.2 2010-05-19
|
80
|
+
* Make Encoding.default_internal aware
|
81
|
+
* Rework logging for making callbacks possible
|
82
|
+
* Remove handling Object types directly
|
83
|
+
|
84
|
+
## 0.10.1.1 2010-01-24
|
85
|
+
|
86
|
+
* JRuby-only: Fix for handling boolean results with a TRUE value.
|
87
|
+
|
88
|
+
## 0.10.1 2010-01-08
|
89
|
+
|
90
|
+
* Support for Ruby 1.8 and 1.9 on Windows.
|
91
|
+
* Switch to Jeweler for Gem building tasks (this change may be temporary).
|
92
|
+
* Switch to using Bacon for running specs: This should make specs friendlier to
|
93
|
+
new Ruby implementations that are not yet 100% MRI-compatible, and in turn,
|
94
|
+
pave the road for our own IronRuby and MacRuby support.
|
95
|
+
* Switch to the newly added rake-compiler `JavaExtensionTask` for compiling
|
96
|
+
JRuby extensions, instead of our (broken) home-grown solution.
|
97
|
+
|
98
|
+
## 0.10.0 2009-09-15
|
99
|
+
* Improvements
|
100
|
+
* JRuby Support (using *do_jdbc*)
|
101
|
+
|
102
|
+
## 0.9.12 2009-05-17
|
103
|
+
* Improvements
|
104
|
+
* rake-compiler for Windows support
|
105
|
+
|
106
|
+
## 0.9.11 2009-01-19
|
107
|
+
* Improvements
|
108
|
+
* Ruby 1.9 support
|
109
|
+
* Fixes
|
110
|
+
* Fix Windows gem
|
111
|
+
|
112
|
+
## 0.9.9 2008-11-27
|
113
|
+
* Improvements
|
114
|
+
* Added cross compile rake tasks for Windows gems [Jonathan Stott, Luis Lavena]
|
115
|
+
* Added initial support for Ruby 1.9 [John Harrison]
|
116
|
+
|
117
|
+
* Bug Fixes
|
118
|
+
* Removed sqlite3.dll from source gem [Dan Kubb]
|
119
|
+
* Removed hard coded .bundle from source [Dirkjan Bussink]
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2007 - 2011 Yehuda Katz, Dirkjan Bussink
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.markdown
ADDED
@@ -0,0 +1,94 @@
|
|
1
|
+
# do_sqlite3
|
2
|
+
|
3
|
+
* <http://dataobjects.info>
|
4
|
+
|
5
|
+
## Description
|
6
|
+
|
7
|
+
A SQLite3 driver for DataObjects.
|
8
|
+
|
9
|
+
## Features/Problems
|
10
|
+
|
11
|
+
This driver implements the DataObjects API for the SQLite3 relational database.
|
12
|
+
|
13
|
+
## Synopsis
|
14
|
+
|
15
|
+
An example of usage:
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
@connection = DataObjects::Connection.new("sqlite3://employees")
|
19
|
+
@reader = @connection.create_command('SELECT * FROM users').execute_reader
|
20
|
+
@reader.next!
|
21
|
+
```
|
22
|
+
|
23
|
+
## Requirements
|
24
|
+
|
25
|
+
This driver is provided for the following platforms:
|
26
|
+
* Ruby MRI (1.8.6/7), 1.9: tested on Linux, Mac OS X and Windows platforms.
|
27
|
+
|
28
|
+
Additionally you should have the following prerequisites:
|
29
|
+
* `data_objects` gem
|
30
|
+
|
31
|
+
## Install
|
32
|
+
|
33
|
+
To install the gem:
|
34
|
+
|
35
|
+
gem install do_sqlite3
|
36
|
+
|
37
|
+
To compile and install from source:
|
38
|
+
|
39
|
+
* Install rake-compiler: `gem install rake-compiler`.
|
40
|
+
|
41
|
+
* For MRI/Rubinius extensions:
|
42
|
+
* Install the `gcc` compiler. On OS X, you should install XCode tools. On
|
43
|
+
Ubuntu, run `apt-get install build-essential`.
|
44
|
+
* Install Ruby and SQLite3.
|
45
|
+
* Install the Ruby and SQLite3 development headers.
|
46
|
+
* On Debian-Linux distributions, you can install the following packages
|
47
|
+
with `apt`: `ruby-dev` `libsqlite3-dev`.
|
48
|
+
* If you want to cross-compile for Windows:
|
49
|
+
* Install MinGW:
|
50
|
+
* On Debian-Linux distributions, you can install the following package
|
51
|
+
with `apt`: `mingw32`.
|
52
|
+
* On OS X, this can install the following package with MacPorts: `i386-mingw32-gcc`.
|
53
|
+
* Run `rake-compiler cross-ruby`.
|
54
|
+
* Run `rake-compiler update-config`.
|
55
|
+
|
56
|
+
* For JRuby extensions:
|
57
|
+
* Install the Java Development Kit (provided if you are
|
58
|
+
on a recent version of Mac OS X) from <http://java.sun.com>.
|
59
|
+
* Install a recent version of JRuby. Ensure `jruby` is in your `PATH` and/or
|
60
|
+
you have configured the `JRUBY_HOME` environment variable to point to your
|
61
|
+
JRuby installation.
|
62
|
+
* Install `data_objects` and `do_jdbc` with `jruby -S rake install`.
|
63
|
+
|
64
|
+
* Then, install this driver with `(jruby -S) rake install`.
|
65
|
+
|
66
|
+
For more information, see the SQLite3 driver wiki page:
|
67
|
+
<http://wiki.github.com/firespring/datamapper-do/sqlite3>.
|
68
|
+
|
69
|
+
## Developers
|
70
|
+
|
71
|
+
Follow the above installation instructions. Additionally, you'll need:
|
72
|
+
* `rspec` gem for running specs.
|
73
|
+
* `YARD` gem for generating documentation.
|
74
|
+
|
75
|
+
See the DataObjects wiki for more comprehensive information on installing and
|
76
|
+
contributing to the JRuby-variant of this driver:
|
77
|
+
<http://wiki.github.com/firespring/datamapper-do/jruby>.
|
78
|
+
|
79
|
+
To run specs:
|
80
|
+
|
81
|
+
rake spec
|
82
|
+
|
83
|
+
To run specs without compiling extensions first:
|
84
|
+
|
85
|
+
rake spec_no_compile
|
86
|
+
|
87
|
+
To run individual specs:
|
88
|
+
|
89
|
+
rake spec SPEC=spec/connection_spec.rb
|
90
|
+
|
91
|
+
## License
|
92
|
+
|
93
|
+
This code is licensed under an **MIT (X11) License**. Please see the
|
94
|
+
accompanying `LICENSE` file.
|
data/Rakefile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'pathname'
|
3
|
+
require 'bundler'
|
4
|
+
require 'rubygems/package_task'
|
5
|
+
Bundler::GemHelper.install_tasks
|
6
|
+
|
7
|
+
require 'rake'
|
8
|
+
require 'rake/clean'
|
9
|
+
|
10
|
+
ROOT = Pathname(__FILE__).dirname.expand_path
|
11
|
+
|
12
|
+
# rubocop:disable Style/StringConcatenation
|
13
|
+
require ROOT + 'lib/do_sqlite3/version'
|
14
|
+
# rubocop:enable Style/StringConcatenation
|
15
|
+
|
16
|
+
SUDO = 'sudo'.freeze unless ENV['SUDOLESS']
|
17
|
+
BINARY_VERSION = '3071700'.freeze
|
18
|
+
|
19
|
+
CLEAN.include(%w({tmp,pkg}/ **/*.{o,so,bundle,jar,log,a,gem,dSYM,obj,pdb,exp,DS_Store,rbc,db} ext/do_sqlite3/Makefile ext-java/target))
|
20
|
+
|
21
|
+
FileList['tasks/**/*.rake'].each { |task| import task }
|
@@ -0,0 +1,55 @@
|
|
1
|
+
#ifndef RUBY_COMPAT_H
|
2
|
+
#define RUBY_COMPAT_H
|
3
|
+
|
4
|
+
/*
|
5
|
+
* Rules for better ruby C extensions:
|
6
|
+
*
|
7
|
+
* Never use the R<TYPE> macros directly, always use R<TYPE>_<FIELD>
|
8
|
+
*
|
9
|
+
* Never compare with RBASIC(obj)->klass, always use
|
10
|
+
* rb_obj_is_instance_of()
|
11
|
+
*
|
12
|
+
* Never use RHASH(obj)->tbl or RHASH_TBL().
|
13
|
+
*
|
14
|
+
*/
|
15
|
+
|
16
|
+
|
17
|
+
// Array
|
18
|
+
#ifndef RARRAY_PTR
|
19
|
+
#define RARRAY_PTR(obj) RARRAY(obj)->ptr
|
20
|
+
#endif
|
21
|
+
|
22
|
+
#ifndef RARRAY_LEN
|
23
|
+
#define RARRAY_LEN(obj) RARRAY(obj)->len
|
24
|
+
#endif
|
25
|
+
|
26
|
+
// String
|
27
|
+
#ifndef RSTRING_PTR
|
28
|
+
#define RSTRING_PTR(obj) RSTRING(obj)->ptr
|
29
|
+
#endif
|
30
|
+
|
31
|
+
#ifndef RSTRING_LEN
|
32
|
+
#define RSTRING_LEN(obj) RSTRING(obj)->len
|
33
|
+
#endif
|
34
|
+
|
35
|
+
#ifndef rb_str_ptr
|
36
|
+
#define rb_str_ptr(str) RSTRING_PTR(str)
|
37
|
+
#endif
|
38
|
+
|
39
|
+
#ifndef rb_str_ptr_readonly
|
40
|
+
#define rb_str_ptr_readonly(str) RSTRING_PTR(str)
|
41
|
+
#endif
|
42
|
+
|
43
|
+
#ifndef rb_str_flush
|
44
|
+
#define rb_str_flush(str)
|
45
|
+
#endif
|
46
|
+
|
47
|
+
#ifndef rb_str_update
|
48
|
+
#define rb_str_update(str)
|
49
|
+
#endif
|
50
|
+
|
51
|
+
#ifndef rb_str_len
|
52
|
+
#define rb_str_len(str) RSTRING_LEN(str)
|
53
|
+
#endif
|
54
|
+
|
55
|
+
#endif
|