db-mariadb 0.9.3 → 0.11.0

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
  SHA256:
3
- metadata.gz: 6f92a4fdce0f6c3eda8421059f94cf4126b6343a0d5ac5b811d770cab857248d
4
- data.tar.gz: 3b3195d019149d21e7b7f0faf99eb8ed87c8b84fa609f44fd46898a820803507
3
+ metadata.gz: 13a5aebccae4f884ebb2993b3e2df5a5aa9ae91ee67d6615cbdde533b7aa3941
4
+ data.tar.gz: ad2d40e822d82331db871fa10e75a6918281269e7aa26d10ef34d21b6edff4ca
5
5
  SHA512:
6
- metadata.gz: 71ec49f4715f988cf51da9555a532d1cc2a1b2f6c3825f3d5066431eb37bafcbd7173efdf177655fbb1fdc5cc67530087584d7e5fee8bcdbc4b955adf12b59c2
7
- data.tar.gz: 8559691086b66b53920e7789b19b711dfd568f5060e0d9e5cf1740c2e3622ffc9ab766e78eabc21d791c3d1c45e849cbb7e24b1f5708baadc59876d13e9a11e1
6
+ metadata.gz: 37e5e16e1c3b3cf92845063ae40d9f9697766cc903bc6f08ce374b28bef148b21ae68fdeee70af5c70fd5058359da11de57272ad8e757270af25bb692653cd33
7
+ data.tar.gz: 103522d5f59fa9caf5b6b7c9b38f6e8da84ef846f2cf7a13a34d52e624dc2e29bed9dcd12bc73f33254c0cde2ef4019956d48a9bb0f6c3530bb7b3a3cf3432aa
checksums.yaml.gz.sig ADDED
Binary file
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2024, by Samuel Williams.
22
5
 
23
6
  require_relative 'connection'
24
7
 
@@ -1,27 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2024, by Samuel Williams.
22
5
 
23
6
  require 'async/pool/resource'
24
- require 'async/io/generic'
25
7
 
26
8
  require_relative 'native/connection'
27
9
 
@@ -41,6 +23,10 @@ module DB
41
23
  super
42
24
  end
43
25
 
26
+ def types
27
+ @native.types
28
+ end
29
+
44
30
  def append_string(value, buffer = String.new)
45
31
  buffer << "'" << @native.escape(value) << "'"
46
32
 
@@ -1,24 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Copyright, 2020, by Samuel G. D. Williams. <http://www.codeotaku.com>
4
- #
5
- # Permission is hereby granted, free of charge, to any person obtaining a copy
6
- # of this software and associated documentation files (the "Software"), to deal
7
- # in the Software without restriction, including without limitation the rights
8
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- # copies of the Software, and to permit persons to whom the Software is
10
- # furnished to do so, subject to the following conditions:
11
- #
12
- # The above copyright notice and this permission notice shall be included in
13
- # all copies or substantial portions of the Software.
14
- #
15
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- # THE SOFTWARE.
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2024, by Samuel Williams.
22
5
 
23
6
  module DB
24
7
  module MariaDB
@@ -1,22 +1,7 @@
1
- # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2024, by Samuel Williams.
20
5
 
21
6
  require_relative 'result'
22
7
  require_relative '../error'
@@ -66,12 +51,6 @@ module DB
66
51
 
67
52
  ffi_attach_function :mysql_real_escape_string, [:pointer, :pointer, :string, :size_t], :size_t
68
53
 
69
- module IO
70
- def self.new(fd, mode)
71
- Async::IO::Generic.new(::IO.new(fd, mode, autoclose: false))
72
- end
73
- end
74
-
75
54
  class Connection < FFI::Pointer
76
55
  def self.connect(wrapper: IO, host: 'localhost', username: nil, password: nil, database: nil, port: 0, unix_socket: nil, client_flags: 0, compression: false, types: DEFAULT_TYPES, **options)
77
56
  pointer = Native.mysql_init(nil)
@@ -91,7 +70,7 @@ module DB
91
70
 
92
71
  status = Native.mysql_real_connect_start(result, pointer, host, username, password, database, port, unix_socket, client_flags);
93
72
 
94
- io = wrapper.new(Native.mysql_get_socket(pointer), "r+")
73
+ io = ::IO.new(Native.mysql_get_socket(pointer), "r+", autoclose: false)
95
74
 
96
75
  if status > 0
97
76
  while status > 0
@@ -123,6 +102,8 @@ module DB
123
102
  @types = types
124
103
  end
125
104
 
105
+ attr :types
106
+
126
107
  def wait_for(status)
127
108
  if status & MYSQL_WAIT_READ
128
109
  @io.wait_readable
@@ -1,22 +1,7 @@
1
- # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2024, by Samuel Williams.
20
5
 
21
6
  require_relative '../native'
22
7
 
@@ -60,25 +45,36 @@ module DB
60
45
  ])
61
46
 
62
47
  DEFAULT_TYPES = {
63
- decimal: Types::Decimal,
64
- boolean: Types::Boolean,
65
- tiny: Types::Integer,
66
- short: Types::Integer,
67
- long: Types::Integer,
68
- float: Types::Float,
69
- double: Types::Float,
70
- timestamp: Types::DateTime,
71
- longlong: Types::Integer,
72
- int24: Types::Integer,
73
- date: Date,
74
- datetime: Types::DateTime,
75
- year: Types::Integer,
76
- newdate: Types::DateTime,
77
- bit: Types::Integer,
78
- json: Types::JSON,
79
- newdecimal: Types::Decimal,
80
- enum: Types::Symbol,
81
- set: Types::Integer,
48
+ # Pseudo types:
49
+ primary_key: Types::Integer.new('BIGINT AUTO_INCREMENT PRIMARY KEY'),
50
+ foreign_key: Types::Integer.new('BIGINT'),
51
+ text: Types::Text.new("TEXT"),
52
+ string: Types::Text.new("VARCHAR(255)"),
53
+
54
+ # Aliases
55
+ smallint: Types::Integer.new("SHORT"),
56
+ integer: Types::Integer.new("INTEGER"),
57
+ bigint: Types::Integer.new("LONG"),
58
+
59
+ # Native types:
60
+ decimal: Types::Decimal.new,
61
+ boolean: Types::Boolean.new,
62
+ tiny: Types::Integer.new("TINY"),
63
+ short: Types::Integer.new("SHORT"),
64
+ long: Types::Integer.new("LONG"),
65
+ longlong: Types::Integer.new("LONGLONG"),
66
+ float: Types::Float.new,
67
+ double: Types::Float.new("DOUBLE"),
68
+ timestamp: Types::DateTime.new("TIMESTAMP"),
69
+ date: Types::Date.new,
70
+ datetime: Types::DateTime.new("DATETIME"),
71
+ year: Types::Integer.new("YEAR"),
72
+ newdate: Types::DateTime.new("DATETIME"),
73
+ bit: Types::Integer.new("BIT"),
74
+ json: Types::JSON.new,
75
+ newdecimal: Types::Decimal.new,
76
+ enum: Types::Symbol.new,
77
+ set: Types::Integer.new("SET"),
82
78
  }
83
79
 
84
80
  class Field < FFI::Struct
@@ -1,22 +1,7 @@
1
- # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2024, by Samuel Williams.
20
5
 
21
6
  require_relative 'field'
22
7
 
@@ -1,24 +1,7 @@
1
- # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
1
+ # frozen_string_literal: true
20
2
 
21
- require 'ffi'
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2024, by Samuel Williams.
22
5
 
23
6
  require 'json'
24
7
  require 'bigdecimal'
@@ -27,14 +10,36 @@ module DB
27
10
  module MariaDB
28
11
  module Native
29
12
  module Types
30
- module Integer
31
- def self.parse(string)
13
+ class Text
14
+ def initialize(name = "TEXT")
15
+ @name = name
16
+ end
17
+
18
+ attr :name
19
+
20
+ def parse(string)
21
+ string
22
+ end
23
+ end
24
+
25
+ class Integer
26
+ def initialize(name = "INTEGER")
27
+ @name = name
28
+ end
29
+
30
+ attr :name
31
+
32
+ def parse(string)
32
33
  Integer(string) if string
33
34
  end
34
35
  end
35
36
 
36
- module Boolean
37
- def self.parse(string)
37
+ class Boolean
38
+ def name
39
+ "BOOLEAN"
40
+ end
41
+
42
+ def parse(string)
38
43
  case string
39
44
  when '0'
40
45
  false
@@ -48,26 +53,60 @@ module DB
48
53
  end
49
54
  end
50
55
 
51
- module Decimal
52
- def self.parse(string)
56
+ class Decimal
57
+ def name
58
+ "DECIMAL"
59
+ end
60
+
61
+ def parse(string)
53
62
  BigDecimal(string) if string
54
63
  end
55
64
  end
56
65
 
57
- module Float
58
- def self.parse(string)
66
+ class Float
67
+ def initialize(name = "FLOAT")
68
+ @name = name
69
+ end
70
+
71
+ attr :name
72
+
73
+ def parse(string)
59
74
  Float(string) if string
60
75
  end
61
76
  end
62
77
 
63
- module Symbol
64
- def self.parse(string)
78
+ class Symbol
79
+ def name
80
+ "ENUM"
81
+ end
82
+
83
+ def parse(string)
65
84
  string&.to_sym
66
85
  end
67
86
  end
68
87
 
69
- module DateTime
70
- def self.parse(string)
88
+ class DateTime
89
+ def initialize(name = "DATETIME")
90
+ @name = name
91
+ end
92
+
93
+ attr :name
94
+
95
+ def parse(string)
96
+ if string
97
+ parts = string.split(/[\-\s:]/)
98
+
99
+ return Time.utc(*parts)
100
+ end
101
+ end
102
+ end
103
+
104
+ class Date
105
+ def name
106
+ "DATE"
107
+ end
108
+
109
+ def parse(string)
71
110
  if string
72
111
  parts = string.split(/[\-\s:]/)
73
112
 
@@ -76,8 +115,12 @@ module DB
76
115
  end
77
116
  end
78
117
 
79
- module JSON
80
- def self.parse(string)
118
+ class JSON
119
+ def name
120
+ "JSON"
121
+ end
122
+
123
+ def parse(string)
81
124
  ::JSON.parse(string, symbolize_names: true) if string
82
125
  end
83
126
  end
@@ -1,22 +1,7 @@
1
- # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2024, by Samuel Williams.
20
5
 
21
6
  require 'ffi/module'
22
7
  require 'ffi/module/config_tool'
@@ -1,25 +1,10 @@
1
- # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2024, by Samuel Williams.
20
5
 
21
6
  module DB
22
7
  module MariaDB
23
- VERSION = "0.9.3"
8
+ VERSION = "0.11.0"
24
9
  end
25
10
  end
data/lib/db/mariadb.rb CHANGED
@@ -1,22 +1,7 @@
1
- # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
- #
3
- # Permission is hereby granted, free of charge, to any person obtaining a copy
4
- # of this software and associated documentation files (the "Software"), to deal
5
- # in the Software without restriction, including without limitation the rights
6
- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
- # copies of the Software, and to permit persons to whom the Software is
8
- # furnished to do so, subject to the following conditions:
9
- #
10
- # The above copyright notice and this permission notice shall be included in
11
- # all copies or substantial portions of the Software.
12
- #
13
- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
- # THE SOFTWARE.
1
+ # frozen_string_literal: true
2
+
3
+ # Released under the MIT License.
4
+ # Copyright, 2020-2024, by Samuel Williams.
20
5
 
21
6
  require_relative 'mariadb/native'
22
7
  require_relative 'mariadb/connection'
data/license.md ADDED
@@ -0,0 +1,22 @@
1
+ # MIT License
2
+
3
+ Copyright, 2020-2024, by Samuel Williams.
4
+ Copyright, 2024, by Hal Brodigan.
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in all
14
+ copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22
+ SOFTWARE.
data/readme.md ADDED
@@ -0,0 +1,29 @@
1
+ # DB::MariaDB
2
+
3
+ A light-weight wrapper for Ruby connecting to MariaDB and MySQL servers.
4
+
5
+ [![Development Status](https://github.com/socketry/db-mariadb/workflows/Test/badge.svg)](https://github.com/socketry/db-mariadb/actions?workflow=Test)
6
+
7
+ ## Usage
8
+
9
+ Please see the [project documentation](https://github.com/socketry/db-mariadb) for more details.
10
+
11
+ - [Getting Started](https://github.com/socketry/db-mariadbguides/getting-started/index) - This guide explains how to get started with the `db-mariadb` gem.
12
+
13
+ ## Contributing
14
+
15
+ We welcome contributions to this project.
16
+
17
+ 1. Fork it.
18
+ 2. Create your feature branch (`git checkout -b my-new-feature`).
19
+ 3. Commit your changes (`git commit -am 'Add some feature'`).
20
+ 4. Push to the branch (`git push origin my-new-feature`).
21
+ 5. Create new Pull Request.
22
+
23
+ ### Developer Certificate of Origin
24
+
25
+ In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
26
+
27
+ ### Community Guidelines
28
+
29
+ This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
data.tar.gz.sig ADDED
Binary file
metadata CHANGED
@@ -1,31 +1,47 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: db-mariadb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.3
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
+ - Hal Brodigan
8
9
  autorequire:
9
10
  bindir: bin
10
- cert_chain: []
11
- date: 2021-05-30 00:00:00.000000000 Z
11
+ cert_chain:
12
+ - |
13
+ -----BEGIN CERTIFICATE-----
14
+ MIIE2DCCA0CgAwIBAgIBATANBgkqhkiG9w0BAQsFADBhMRgwFgYDVQQDDA9zYW11
15
+ ZWwud2lsbGlhbXMxHTAbBgoJkiaJk/IsZAEZFg1vcmlvbnRyYW5zZmVyMRIwEAYK
16
+ CZImiZPyLGQBGRYCY28xEjAQBgoJkiaJk/IsZAEZFgJuejAeFw0yMjA4MDYwNDUz
17
+ MjRaFw0zMjA4MDMwNDUzMjRaMGExGDAWBgNVBAMMD3NhbXVlbC53aWxsaWFtczEd
18
+ MBsGCgmSJomT8ixkARkWDW9yaW9udHJhbnNmZXIxEjAQBgoJkiaJk/IsZAEZFgJj
19
+ bzESMBAGCgmSJomT8ixkARkWAm56MIIBojANBgkqhkiG9w0BAQEFAAOCAY8AMIIB
20
+ igKCAYEAomvSopQXQ24+9DBB6I6jxRI2auu3VVb4nOjmmHq7XWM4u3HL+pni63X2
21
+ 9qZdoq9xt7H+RPbwL28LDpDNflYQXoOhoVhQ37Pjn9YDjl8/4/9xa9+NUpl9XDIW
22
+ sGkaOY0eqsQm1pEWkHJr3zn/fxoKPZPfaJOglovdxf7dgsHz67Xgd/ka+Wo1YqoE
23
+ e5AUKRwUuvaUaumAKgPH+4E4oiLXI4T1Ff5Q7xxv6yXvHuYtlMHhYfgNn8iiW8WN
24
+ XibYXPNP7NtieSQqwR/xM6IRSoyXKuS+ZNGDPUUGk8RoiV/xvVN4LrVm9upSc0ss
25
+ RZ6qwOQmXCo/lLcDUxJAgG95cPw//sI00tZan75VgsGzSWAOdjQpFM0l4dxvKwHn
26
+ tUeT3ZsAgt0JnGqNm2Bkz81kG4A2hSyFZTFA8vZGhp+hz+8Q573tAR89y9YJBdYM
27
+ zp0FM4zwMNEUwgfRzv1tEVVUEXmoFCyhzonUUw4nE4CFu/sE3ffhjKcXcY//qiSW
28
+ xm4erY3XAgMBAAGjgZowgZcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAwHQYDVR0O
29
+ BBYEFO9t7XWuFf2SKLmuijgqR4sGDlRsMC4GA1UdEQQnMCWBI3NhbXVlbC53aWxs
30
+ aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MC4GA1UdEgQnMCWBI3NhbXVlbC53aWxs
31
+ aWFtc0BvcmlvbnRyYW5zZmVyLmNvLm56MA0GCSqGSIb3DQEBCwUAA4IBgQB5sxkE
32
+ cBsSYwK6fYpM+hA5B5yZY2+L0Z+27jF1pWGgbhPH8/FjjBLVn+VFok3CDpRqwXCl
33
+ xCO40JEkKdznNy2avOMra6PFiQyOE74kCtv7P+Fdc+FhgqI5lMon6tt9rNeXmnW/
34
+ c1NaMRdxy999hmRGzUSFjozcCwxpy/LwabxtdXwXgSay4mQ32EDjqR1TixS1+smp
35
+ 8C/NCWgpIfzpHGJsjvmH2wAfKtTTqB9CVKLCWEnCHyCaRVuKkrKjqhYCdmMBqCws
36
+ JkxfQWC+jBVeG9ZtPhQgZpfhvh+6hMhraUYRQ6XGyvBqEUe+yo6DKIT3MtGE2+CP
37
+ eX9i9ZWBydWb8/rvmwmX2kkcBbX0hZS1rcR593hGc61JR6lvkGYQ2MYskBveyaxt
38
+ Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
39
+ voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
40
+ -----END CERTIFICATE-----
41
+ date: 2024-07-26 00:00:00.000000000 Z
12
42
  dependencies:
13
43
  - !ruby/object:Gem::Dependency
14
- name: ffi-module
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: 0.3.0
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: 0.3.0
27
- - !ruby/object:Gem::Dependency
28
- name: async-io
44
+ name: async-pool
29
45
  requirement: !ruby/object:Gem::Requirement
30
46
  requirements:
31
47
  - - ">="
@@ -39,55 +55,13 @@ dependencies:
39
55
  - !ruby/object:Gem::Version
40
56
  version: '0'
41
57
  - !ruby/object:Gem::Dependency
42
- name: async-rspec
58
+ name: bigdecimal
43
59
  requirement: !ruby/object:Gem::Requirement
44
60
  requirements:
45
61
  - - ">="
46
62
  - !ruby/object:Gem::Version
47
63
  version: '0'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: '0'
55
- - !ruby/object:Gem::Dependency
56
- name: bake
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: covered
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: bundler
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
64
+ type: :runtime
91
65
  prerelease: false
92
66
  version_requirements: !ruby/object:Gem::Requirement
93
67
  requirements:
@@ -95,26 +69,25 @@ dependencies:
95
69
  - !ruby/object:Gem::Version
96
70
  version: '0'
97
71
  - !ruby/object:Gem::Dependency
98
- name: rspec
72
+ name: ffi-module
99
73
  requirement: !ruby/object:Gem::Requirement
100
74
  requirements:
101
75
  - - "~>"
102
76
  - !ruby/object:Gem::Version
103
- version: '3.6'
104
- type: :development
77
+ version: 0.3.0
78
+ type: :runtime
105
79
  prerelease: false
106
80
  version_requirements: !ruby/object:Gem::Requirement
107
81
  requirements:
108
82
  - - "~>"
109
83
  - !ruby/object:Gem::Version
110
- version: '3.6'
84
+ version: 0.3.0
111
85
  description:
112
86
  email:
113
87
  executables: []
114
88
  extensions: []
115
89
  extra_rdoc_files: []
116
90
  files:
117
- - lib/.DS_Store
118
91
  - lib/db/mariadb.rb
119
92
  - lib/db/mariadb/adapter.rb
120
93
  - lib/db/mariadb/connection.rb
@@ -125,10 +98,13 @@ files:
125
98
  - lib/db/mariadb/native/result.rb
126
99
  - lib/db/mariadb/native/types.rb
127
100
  - lib/db/mariadb/version.rb
128
- homepage:
101
+ - license.md
102
+ - readme.md
103
+ homepage: https://github.com/socketry/db-mariadb
129
104
  licenses:
130
105
  - MIT
131
- metadata: {}
106
+ metadata:
107
+ source_code_uri: https://github.com/socketry/db-mariadb.git
132
108
  post_install_message:
133
109
  rdoc_options: []
134
110
  require_paths:
@@ -137,14 +113,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
137
113
  requirements:
138
114
  - - ">="
139
115
  - !ruby/object:Gem::Version
140
- version: '2.5'
116
+ version: '3.1'
141
117
  required_rubygems_version: !ruby/object:Gem::Requirement
142
118
  requirements:
143
119
  - - ">="
144
120
  - !ruby/object:Gem::Version
145
121
  version: '0'
146
122
  requirements: []
147
- rubygems_version: 3.2.15
123
+ rubygems_version: 3.5.11
148
124
  signing_key:
149
125
  specification_version: 4
150
126
  summary: An event-driven interface for MariaDB and MySQL servers.
metadata.gz.sig ADDED
Binary file
data/lib/.DS_Store DELETED
Binary file