sqlean 0.1.0-arm64-darwin → 0.3.0-arm64-darwin
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +16 -3
- data/README.md +23 -4
- data/lib/sqlean/upstream.rb +4 -2
- data/lib/sqlean/version.rb +2 -1
- data/lib/sqlean.rb +15 -32
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc7f08a49e0b10bcedb0917ea8289d9dcd902a8016f1d42e2e091da1ab7a0048
|
4
|
+
data.tar.gz: 3b65cadcd97cf2d5ca4e73331152065e2d4556ee6dcb223f8c071b3df7d6b1cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ea8717dd4f2a1b61c240a321ae3e87545081e37f6f0d29dfd2debef6e5f78491476e29e5328928797ca5c6d35cdd7b973776e19246d2e744f51fb68455d2db00
|
7
|
+
data.tar.gz: cb73d74d4f2afe88a3f86ec9045c5d1acfad8905fbef142c9d479ead478a8ff7a3ff9c5b06b892f819531eb86243472ebd915aa6ae2fa4091c8d10a1a2fdb51d
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,18 @@
|
|
1
|
-
|
1
|
+
# SQLean for Ruby Changelog
|
2
2
|
|
3
|
-
##
|
3
|
+
## v0.3.0 / 2024-11-26
|
4
4
|
|
5
|
-
|
5
|
+
### Breaking change
|
6
|
+
|
7
|
+
- Drop `#sqlite_extension_path` for the simpler `#to_path`. [#3] @flavorjones
|
8
|
+
|
9
|
+
|
10
|
+
## v0.2.0 / 2024-11-24
|
11
|
+
|
12
|
+
- Support for x86_64-linux-musl with self-built extensions.
|
13
|
+
- Explicitly state no-support for aarch64-linux-musl.
|
14
|
+
|
15
|
+
|
16
|
+
## v0.1.0 / 2024-11-24
|
17
|
+
|
18
|
+
- Initial experimental release
|
data/README.md
CHANGED
@@ -34,8 +34,8 @@ require "sqlean"
|
|
34
34
|
db = SQLite3::Database.new("path/to/db.sqlite")
|
35
35
|
db.enable_load_extension(true)
|
36
36
|
|
37
|
-
db.load_extension(SQLean.
|
38
|
-
db.load_extension(SQLean::Crypto.
|
37
|
+
db.load_extension(SQLean.to_path) # load every extension in SQLean
|
38
|
+
db.load_extension(SQLean::Crypto.to_path) # or load individual extensions
|
39
39
|
```
|
40
40
|
|
41
41
|
<!-- not available yet!
|
@@ -73,8 +73,8 @@ require "sqlean"
|
|
73
73
|
|
74
74
|
db = Extralite::Database.new("path/to/db.sqlite")
|
75
75
|
|
76
|
-
db.load_extension(SQLean.
|
77
|
-
db.load_extension(SQLean::Crypto.
|
76
|
+
db.load_extension(SQLean.to_path) # load every extension in SQLean
|
77
|
+
db.load_extension(SQLean::Crypto.to_path) # or load individual extensions
|
78
78
|
```
|
79
79
|
|
80
80
|
|
@@ -92,6 +92,25 @@ If bundler is not being used to manage dependencies, install the gem by executin
|
|
92
92
|
gem install sqlean
|
93
93
|
```
|
94
94
|
|
95
|
+
Note that right now, the only platforms supported are:
|
96
|
+
|
97
|
+
- MacOS / Darwin:
|
98
|
+
- x86_64
|
99
|
+
- arm64
|
100
|
+
- Linux
|
101
|
+
- x86_64 gnu
|
102
|
+
- x86_64 musl
|
103
|
+
- aarch64 gnu
|
104
|
+
- Windows
|
105
|
+
- mingw (64-bit)
|
106
|
+
|
107
|
+
Specifically what's missing is support for:
|
108
|
+
|
109
|
+
- Linux aarch64 musl
|
110
|
+
- Windows mingw32 (32-bit)
|
111
|
+
|
112
|
+
If you need support for one of these platforms, please open an issue. I would also gladly welcome folks who are willing to help add support.
|
113
|
+
|
95
114
|
|
96
115
|
## Development
|
97
116
|
|
data/lib/sqlean/upstream.rb
CHANGED
@@ -2,12 +2,14 @@
|
|
2
2
|
|
3
3
|
module SQLean
|
4
4
|
module Upstream
|
5
|
+
# The version of upstream sqlean extensions used.
|
5
6
|
VERSION = "0.27.1"
|
6
7
|
|
7
8
|
# rubygems platform name => upstream release filename fragment
|
8
9
|
NATIVE_PLATFORMS = {
|
9
|
-
"aarch64-linux" => "linux-arm64",
|
10
|
-
"x86_64-linux" => "linux-x86",
|
10
|
+
"aarch64-linux-gnu" => "linux-arm64",
|
11
|
+
"x86_64-linux-gnu" => "linux-x86",
|
12
|
+
"x86_64-linux-musl" => "linux-x86-musl",
|
11
13
|
|
12
14
|
"arm64-darwin" => "macos-arm64",
|
13
15
|
"x86_64-darwin" => "macos-x86",
|
data/lib/sqlean/version.rb
CHANGED
data/lib/sqlean.rb
CHANGED
@@ -8,19 +8,16 @@ module SQLean
|
|
8
8
|
class UnsupportedPlatform < StandardError; end
|
9
9
|
|
10
10
|
GEM_NAME = "sqlean"
|
11
|
-
WINDOWS_PLATFORM_REGEX = /mingw|mswin/ # :nodoc:
|
12
|
-
LINUX_PLATFORM_REGEX = /linux/ # :nodoc:
|
13
|
-
DARWIN_PLATFORM_REGEX = /darwin/ # :nodoc:
|
14
11
|
|
15
12
|
# Returns an absolute path to the SQLean bundle, containing all the SQLean extensions.
|
16
|
-
def self.
|
13
|
+
def self.to_path
|
17
14
|
SQLean.file_path("sqlean")
|
18
15
|
end
|
19
16
|
|
20
17
|
# https://github.com/nalgeon/sqlean/blob/main/docs/crypto.md
|
21
18
|
module Crypto
|
22
19
|
# Returns an absolute path to the SQLean crypto extension.
|
23
|
-
def self.
|
20
|
+
def self.to_path
|
24
21
|
SQLean.file_path("crypto")
|
25
22
|
end
|
26
23
|
end
|
@@ -28,7 +25,7 @@ module SQLean
|
|
28
25
|
# https://github.com/nalgeon/sqlean/blob/main/docs/define.md
|
29
26
|
module Define
|
30
27
|
# Returns an absolute path to the SQLean define extension.
|
31
|
-
def self.
|
28
|
+
def self.to_path
|
32
29
|
SQLean.file_path("define")
|
33
30
|
end
|
34
31
|
end
|
@@ -36,7 +33,7 @@ module SQLean
|
|
36
33
|
# https://github.com/nalgeon/sqlean/blob/main/docs/fileio.md
|
37
34
|
module FileIO
|
38
35
|
# Returns an absolute path to the SQLean fileio extension.
|
39
|
-
def self.
|
36
|
+
def self.to_path
|
40
37
|
SQLean.file_path("fileio")
|
41
38
|
end
|
42
39
|
end
|
@@ -44,7 +41,7 @@ module SQLean
|
|
44
41
|
# https://github.com/nalgeon/sqlean/blob/main/docs/fuzzy.md
|
45
42
|
module Fuzzy
|
46
43
|
# Returns an absolute path to the SQLean fuzzy extension.
|
47
|
-
def self.
|
44
|
+
def self.to_path
|
48
45
|
SQLean.file_path("fuzzy")
|
49
46
|
end
|
50
47
|
end
|
@@ -52,7 +49,7 @@ module SQLean
|
|
52
49
|
# https://github.com/nalgeon/sqlean/blob/main/docs/ipaddr.md
|
53
50
|
module IPAddr
|
54
51
|
# Returns an absolute path to the SQLean ipaddr extension.
|
55
|
-
def self.
|
52
|
+
def self.to_path
|
56
53
|
SQLean.file_path("ipaddr")
|
57
54
|
end
|
58
55
|
end
|
@@ -60,7 +57,7 @@ module SQLean
|
|
60
57
|
# https://github.com/nalgeon/sqlean/blob/main/docs/math.md
|
61
58
|
module Math
|
62
59
|
# Returns an absolute path to the SQLean math extension.
|
63
|
-
def self.
|
60
|
+
def self.to_path
|
64
61
|
SQLean.file_path("math")
|
65
62
|
end
|
66
63
|
end
|
@@ -68,7 +65,7 @@ module SQLean
|
|
68
65
|
# https://github.com/nalgeon/sqlean/blob/main/docs/regexp.md
|
69
66
|
module Regexp
|
70
67
|
# Returns an absolute path to the SQLean regexp extension.
|
71
|
-
def self.
|
68
|
+
def self.to_path
|
72
69
|
SQLean.file_path("regexp")
|
73
70
|
end
|
74
71
|
end
|
@@ -76,7 +73,7 @@ module SQLean
|
|
76
73
|
# https://github.com/nalgeon/sqlean/blob/main/docs/stats.md
|
77
74
|
module Stats
|
78
75
|
# Returns an absolute path to the SQLean stats extension.
|
79
|
-
def self.
|
76
|
+
def self.to_path
|
80
77
|
SQLean.file_path("stats")
|
81
78
|
end
|
82
79
|
end
|
@@ -84,7 +81,7 @@ module SQLean
|
|
84
81
|
# https://github.com/nalgeon/sqlean/blob/main/docs/text.md
|
85
82
|
module Text
|
86
83
|
# Returns an absolute path to the SQLean text extension.
|
87
|
-
def self.
|
84
|
+
def self.to_path
|
88
85
|
SQLean.file_path("text")
|
89
86
|
end
|
90
87
|
end
|
@@ -92,7 +89,7 @@ module SQLean
|
|
92
89
|
# https://github.com/nalgeon/sqlean/blob/main/docs/time.md
|
93
90
|
module Time
|
94
91
|
# Returns an absolute path to the SQLean text extension.
|
95
|
-
def self.
|
92
|
+
def self.to_path
|
96
93
|
SQLean.file_path("time")
|
97
94
|
end
|
98
95
|
end
|
@@ -100,7 +97,7 @@ module SQLean
|
|
100
97
|
# https://github.com/nalgeon/sqlean/blob/main/docs/unicode.md
|
101
98
|
module Unicode
|
102
99
|
# Returns an absolute path to the SQLean unicode extension.
|
103
|
-
def self.
|
100
|
+
def self.to_path
|
104
101
|
SQLean.file_path("unicode")
|
105
102
|
end
|
106
103
|
end
|
@@ -108,7 +105,7 @@ module SQLean
|
|
108
105
|
# https://github.com/nalgeon/sqlean/blob/main/docs/uuid.md
|
109
106
|
module UUID
|
110
107
|
# Returns an absolute path to the SQLean uuid extension.
|
111
|
-
def self.
|
108
|
+
def self.to_path
|
112
109
|
SQLean.file_path("uuid")
|
113
110
|
end
|
114
111
|
end
|
@@ -116,7 +113,7 @@ module SQLean
|
|
116
113
|
# https://github.com/nalgeon/sqlean/blob/main/docs/vsv.md
|
117
114
|
module VSV
|
118
115
|
# Returns an absolute path to the SQLean vsv extension.
|
119
|
-
def self.
|
116
|
+
def self.to_path
|
120
117
|
SQLean.file_path("vsv")
|
121
118
|
end
|
122
119
|
end
|
@@ -125,7 +122,7 @@ module SQLean
|
|
125
122
|
# "private" methods
|
126
123
|
#
|
127
124
|
def self.file_path(name) # :nodoc:
|
128
|
-
File.join(SQLean.file_dir,
|
125
|
+
File.join(SQLean.file_dir, name)
|
129
126
|
end
|
130
127
|
|
131
128
|
def self.file_dir # :nodoc:
|
@@ -144,20 +141,6 @@ module SQLean
|
|
144
141
|
end
|
145
142
|
end
|
146
143
|
|
147
|
-
def self.file_ext # :nodoc:
|
148
|
-
@file_ext ||=
|
149
|
-
case platform
|
150
|
-
when WINDOWS_PLATFORM_REGEX
|
151
|
-
"dll"
|
152
|
-
when DARWIN_PLATFORM_REGEX
|
153
|
-
"dylib"
|
154
|
-
when LINUX_PLATFORM_REGEX
|
155
|
-
"so"
|
156
|
-
else
|
157
|
-
raise "Unknown or unsupported platform: #{platform}"
|
158
|
-
end
|
159
|
-
end
|
160
|
-
|
161
144
|
# here mostly for testing purposes (to stub)
|
162
145
|
def self.platform # :nodoc:
|
163
146
|
RUBY_PLATFORM
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqlean
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: arm64-darwin
|
6
6
|
authors:
|
7
7
|
- Mike Dalessio
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-11-
|
11
|
+
date: 2024-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: |
|
14
14
|
Precompiled SQLean extensions for SQLite, packaged for the Ruby ecosystem. Compatible with
|