db-mariadb 0.11.2 → 0.12.0
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/context/getting-started.md +37 -0
- data/context/index.yaml +12 -0
- data/lib/db/mariadb/connection.rb +14 -1
- data/lib/db/mariadb/version.rb +1 -1
- data/license.md +1 -1
- data/readme.md +8 -0
- data/releases.md +5 -0
- data.tar.gz.sig +0 -0
- metadata +21 -9
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 050ee64e32a8e631d92eabf9f083c2deec5264499d3fdba633c36219cb60af86
|
4
|
+
data.tar.gz: 0c071d964a35cc442a635508b388dbf876bad383b1ca6547233b2664ef955efa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3511e405a4fdaf2004afc01e74e0422845309548032f38fbf5b529aa651cc28654f0ae6e0facd3e51fe8dd5b8925e8340d430a833c253763773830240a71f294
|
7
|
+
data.tar.gz: 5b58d08833f4fd78bc23d675ebf9f0a3515961c7daf8a21128fdf41efa9c066264c4d745a8a4695197fdc6e2f725b45e1cfd674520d8d6c2643e91adca1d49ea
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Getting Started
|
2
|
+
|
3
|
+
This guide explains how to get started with the `db-mariadb` gem.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add the gem to your project:
|
8
|
+
|
9
|
+
~~~ bash
|
10
|
+
$ bundle add db-mariadb
|
11
|
+
~~~
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
Here is an example of the basic usage of the adapter:
|
16
|
+
|
17
|
+
~~~ ruby
|
18
|
+
require 'async'
|
19
|
+
require 'db/mariadb'
|
20
|
+
|
21
|
+
# Create an event loop:
|
22
|
+
Sync do
|
23
|
+
# Create the adapter and connect to the database:
|
24
|
+
adapter = DB::MariaDB::Adapter.new(database: 'test')
|
25
|
+
connection = adapter.call
|
26
|
+
|
27
|
+
# Execute the query:
|
28
|
+
result = connection.send_query("SELECT VERSION()")
|
29
|
+
|
30
|
+
# Get the results:
|
31
|
+
pp connection.next_result.to_a
|
32
|
+
# => [["10.4.13-MariaDB"]]
|
33
|
+
ensure
|
34
|
+
# Return the connection to the client connection pool:
|
35
|
+
connection.close
|
36
|
+
end
|
37
|
+
~~~
|
data/context/index.yaml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# Automatically generated context index for Utopia::Project guides.
|
2
|
+
# Do not edit then files in this directory directly, instead edit the guides and then run `bake utopia:project:agent:context:update`.
|
3
|
+
---
|
4
|
+
description: An event-driven interface for MariaDB and MySQL servers.
|
5
|
+
metadata:
|
6
|
+
documentation_uri: https://socketry.github.io/db-mariadb/
|
7
|
+
funding_uri: https://github.com/sponsors/ioquatix
|
8
|
+
source_code_uri: https://github.com/socketry/db-mariadb.git
|
9
|
+
files:
|
10
|
+
- path: getting-started.md
|
11
|
+
title: Getting Started
|
12
|
+
description: This guide explains how to get started with the `db-mariadb` gem.
|
@@ -1,9 +1,10 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
# Released under the MIT License.
|
4
|
-
# Copyright, 2020-
|
4
|
+
# Copyright, 2020-2025, by Samuel Williams.
|
5
5
|
|
6
6
|
require 'async/pool/resource'
|
7
|
+
require 'db/features'
|
7
8
|
|
8
9
|
require_relative 'native/connection'
|
9
10
|
|
@@ -101,6 +102,18 @@ module DB
|
|
101
102
|
@native.next_result
|
102
103
|
end
|
103
104
|
|
105
|
+
FEATURES = DB::Features.new(
|
106
|
+
modify_column: true,
|
107
|
+
conditional_operations: true,
|
108
|
+
batch_alter_table: true,
|
109
|
+
auto_increment: true
|
110
|
+
)
|
111
|
+
|
112
|
+
# Database feature detection for migration and query building.
|
113
|
+
def features
|
114
|
+
FEATURES
|
115
|
+
end
|
116
|
+
|
104
117
|
protected
|
105
118
|
|
106
119
|
def escape_identifier(value)
|
data/lib/db/mariadb/version.rb
CHANGED
data/license.md
CHANGED
data/readme.md
CHANGED
@@ -10,6 +10,14 @@ Please see the [project documentation](https://socketry.github.io/db-mariadb/) f
|
|
10
10
|
|
11
11
|
- [Getting Started](https://socketry.github.io/db-mariadb/guides/getting-started/index) - This guide explains how to get started with the `db-mariadb` gem.
|
12
12
|
|
13
|
+
## Releases
|
14
|
+
|
15
|
+
Please see the [project releases](https://socketry.github.io/db-mariadb/releases/index) for all releases.
|
16
|
+
|
17
|
+
### v0.12.0
|
18
|
+
|
19
|
+
- Add support for `DB::Features`.
|
20
|
+
|
13
21
|
## Contributing
|
14
22
|
|
15
23
|
We welcome contributions to this project.
|
data/releases.md
ADDED
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: db-mariadb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
- Hal Brodigan
|
9
|
-
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain:
|
12
11
|
- |
|
@@ -38,7 +37,7 @@ cert_chain:
|
|
38
37
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
39
38
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
40
39
|
-----END CERTIFICATE-----
|
41
|
-
date:
|
40
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
42
41
|
dependencies:
|
43
42
|
- !ruby/object:Gem::Dependency
|
44
43
|
name: async-pool
|
@@ -68,6 +67,20 @@ dependencies:
|
|
68
67
|
- - ">="
|
69
68
|
- !ruby/object:Gem::Version
|
70
69
|
version: '0'
|
70
|
+
- !ruby/object:Gem::Dependency
|
71
|
+
name: db
|
72
|
+
requirement: !ruby/object:Gem::Requirement
|
73
|
+
requirements:
|
74
|
+
- - "~>"
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0.14'
|
77
|
+
type: :runtime
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - "~>"
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0.14'
|
71
84
|
- !ruby/object:Gem::Dependency
|
72
85
|
name: ffi-module
|
73
86
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,12 +95,12 @@ dependencies:
|
|
82
95
|
- - "~>"
|
83
96
|
- !ruby/object:Gem::Version
|
84
97
|
version: 0.3.0
|
85
|
-
description:
|
86
|
-
email:
|
87
98
|
executables: []
|
88
99
|
extensions: []
|
89
100
|
extra_rdoc_files: []
|
90
101
|
files:
|
102
|
+
- context/getting-started.md
|
103
|
+
- context/index.yaml
|
91
104
|
- lib/db/mariadb.rb
|
92
105
|
- lib/db/mariadb/adapter.rb
|
93
106
|
- lib/db/mariadb/connection.rb
|
@@ -100,6 +113,7 @@ files:
|
|
100
113
|
- lib/db/mariadb/version.rb
|
101
114
|
- license.md
|
102
115
|
- readme.md
|
116
|
+
- releases.md
|
103
117
|
homepage: https://github.com/socketry/db-mariadb
|
104
118
|
licenses:
|
105
119
|
- MIT
|
@@ -107,7 +121,6 @@ metadata:
|
|
107
121
|
documentation_uri: https://socketry.github.io/db-mariadb/
|
108
122
|
funding_uri: https://github.com/sponsors/ioquatix
|
109
123
|
source_code_uri: https://github.com/socketry/db-mariadb.git
|
110
|
-
post_install_message:
|
111
124
|
rdoc_options: []
|
112
125
|
require_paths:
|
113
126
|
- lib
|
@@ -115,15 +128,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
115
128
|
requirements:
|
116
129
|
- - ">="
|
117
130
|
- !ruby/object:Gem::Version
|
118
|
-
version: '3.
|
131
|
+
version: '3.2'
|
119
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
120
133
|
requirements:
|
121
134
|
- - ">="
|
122
135
|
- !ruby/object:Gem::Version
|
123
136
|
version: '0'
|
124
137
|
requirements: []
|
125
|
-
rubygems_version: 3.
|
126
|
-
signing_key:
|
138
|
+
rubygems_version: 3.6.9
|
127
139
|
specification_version: 4
|
128
140
|
summary: An event-driven interface for MariaDB and MySQL servers.
|
129
141
|
test_files: []
|
metadata.gz.sig
CHANGED
Binary file
|