pakyow-data 1.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG.md +0 -0
- data/LICENSE +4 -0
- data/README.md +29 -0
- data/lib/pakyow/data/adapters/abstract.rb +58 -0
- data/lib/pakyow/data/adapters/sql/commands.rb +58 -0
- data/lib/pakyow/data/adapters/sql/dataset_methods.rb +29 -0
- data/lib/pakyow/data/adapters/sql/differ.rb +76 -0
- data/lib/pakyow/data/adapters/sql/migrator/adapter_methods.rb +95 -0
- data/lib/pakyow/data/adapters/sql/migrator.rb +181 -0
- data/lib/pakyow/data/adapters/sql/migrators/automator.rb +49 -0
- data/lib/pakyow/data/adapters/sql/migrators/finalizer.rb +96 -0
- data/lib/pakyow/data/adapters/sql/runner.rb +49 -0
- data/lib/pakyow/data/adapters/sql/source_extension.rb +31 -0
- data/lib/pakyow/data/adapters/sql/types.rb +50 -0
- data/lib/pakyow/data/adapters/sql.rb +247 -0
- data/lib/pakyow/data/behavior/config.rb +28 -0
- data/lib/pakyow/data/behavior/lookup.rb +75 -0
- data/lib/pakyow/data/behavior/serialization.rb +40 -0
- data/lib/pakyow/data/connection.rb +103 -0
- data/lib/pakyow/data/container.rb +273 -0
- data/lib/pakyow/data/errors.rb +169 -0
- data/lib/pakyow/data/framework.rb +42 -0
- data/lib/pakyow/data/helpers.rb +11 -0
- data/lib/pakyow/data/lookup.rb +85 -0
- data/lib/pakyow/data/migrator.rb +182 -0
- data/lib/pakyow/data/object.rb +98 -0
- data/lib/pakyow/data/proxy.rb +262 -0
- data/lib/pakyow/data/result.rb +53 -0
- data/lib/pakyow/data/sources/abstract.rb +82 -0
- data/lib/pakyow/data/sources/ephemeral.rb +72 -0
- data/lib/pakyow/data/sources/relational/association.rb +43 -0
- data/lib/pakyow/data/sources/relational/associations/belongs_to.rb +47 -0
- data/lib/pakyow/data/sources/relational/associations/has_many.rb +54 -0
- data/lib/pakyow/data/sources/relational/associations/has_one.rb +54 -0
- data/lib/pakyow/data/sources/relational/associations/through.rb +67 -0
- data/lib/pakyow/data/sources/relational/command.rb +531 -0
- data/lib/pakyow/data/sources/relational/migrator.rb +101 -0
- data/lib/pakyow/data/sources/relational.rb +587 -0
- data/lib/pakyow/data/subscribers/adapters/memory.rb +153 -0
- data/lib/pakyow/data/subscribers/adapters/redis/pipeliner.rb +45 -0
- data/lib/pakyow/data/subscribers/adapters/redis/scripts/_shared.lua +73 -0
- data/lib/pakyow/data/subscribers/adapters/redis/scripts/expire.lua +16 -0
- data/lib/pakyow/data/subscribers/adapters/redis/scripts/persist.lua +15 -0
- data/lib/pakyow/data/subscribers/adapters/redis/scripts/register.lua +37 -0
- data/lib/pakyow/data/subscribers/adapters/redis.rb +209 -0
- data/lib/pakyow/data/subscribers.rb +148 -0
- data/lib/pakyow/data/tasks/bootstrap.rake +18 -0
- data/lib/pakyow/data/tasks/create.rake +22 -0
- data/lib/pakyow/data/tasks/drop.rake +32 -0
- data/lib/pakyow/data/tasks/finalize.rake +56 -0
- data/lib/pakyow/data/tasks/migrate.rake +24 -0
- data/lib/pakyow/data/tasks/reset.rake +18 -0
- data/lib/pakyow/data/types.rb +37 -0
- data/lib/pakyow/data.rb +27 -0
- data/lib/pakyow/environment/data/auto_migrate.rb +31 -0
- data/lib/pakyow/environment/data/config.rb +54 -0
- data/lib/pakyow/environment/data/connections.rb +76 -0
- data/lib/pakyow/environment/data/memory_db.rb +23 -0
- data/lib/pakyow/validations/unique.rb +26 -0
- metadata +186 -0
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "pakyow/data/migrator"
|
4
|
+
|
5
|
+
namespace :db do
|
6
|
+
desc "Bootstrap a database"
|
7
|
+
option :adapter, "The adapter to migrate"
|
8
|
+
option :connection, "The connection to migrate"
|
9
|
+
task :bootstrap, [:adapter, :connection] do |_, args|
|
10
|
+
%w[
|
11
|
+
db:create
|
12
|
+
db:migrate
|
13
|
+
].each do |task|
|
14
|
+
Pakyow.logger.info "[db:bootstrap] running: #{task}"
|
15
|
+
Rake::Task[task].invoke(args[:adapter], args[:connection])
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "pakyow/data/migrator"
|
4
|
+
|
5
|
+
namespace :db do
|
6
|
+
desc "Create a database"
|
7
|
+
option :adapter, "The adapter to migrate"
|
8
|
+
option :connection, "The connection to migrate"
|
9
|
+
task :create, [:adapter, :connection] do |_, args|
|
10
|
+
unless Pakyow.booted?
|
11
|
+
Pakyow.boot(unsafe: true)
|
12
|
+
end
|
13
|
+
|
14
|
+
migrator = Pakyow::Data::Migrator.connect_global(
|
15
|
+
adapter: args[:adapter],
|
16
|
+
connection: args[:connection]
|
17
|
+
)
|
18
|
+
|
19
|
+
migrator.create!
|
20
|
+
migrator.disconnect!
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "pakyow/data/migrator"
|
4
|
+
|
5
|
+
namespace :db do
|
6
|
+
desc "Drop a database"
|
7
|
+
option :adapter, "The adapter to migrate"
|
8
|
+
option :connection, "The connection to migrate"
|
9
|
+
task :drop, [:adapter, :connection] do |_, args|
|
10
|
+
unless Pakyow.booted?
|
11
|
+
Pakyow.boot(unsafe: true)
|
12
|
+
end
|
13
|
+
|
14
|
+
begin
|
15
|
+
if connection = Pakyow.connection(args[:adapter], args[:connection])
|
16
|
+
connection.disconnect
|
17
|
+
end
|
18
|
+
# rubocop:disable Lint/HandleExceptions
|
19
|
+
rescue ArgumentError
|
20
|
+
# catch the case where the connection doesn't exist
|
21
|
+
end
|
22
|
+
# rubocop:enable Lint/HandleExceptions
|
23
|
+
|
24
|
+
migrator = Pakyow::Data::Migrator.connect_global(
|
25
|
+
adapter: args[:adapter],
|
26
|
+
connection: args[:connection]
|
27
|
+
)
|
28
|
+
|
29
|
+
migrator.drop!
|
30
|
+
migrator.disconnect!
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "pakyow/data/migrator"
|
4
|
+
|
5
|
+
namespace :db do
|
6
|
+
desc "Finalize a database"
|
7
|
+
option :adapter, "The adapter to migrate"
|
8
|
+
option :connection, "The connection to migrate"
|
9
|
+
task :finalize, [:adapter, :connection] do |_, args|
|
10
|
+
unless Pakyow.booted?
|
11
|
+
Pakyow.boot(unsafe: true)
|
12
|
+
end
|
13
|
+
|
14
|
+
opts = {
|
15
|
+
adapter: args[:adapter],
|
16
|
+
connection: args[:connection],
|
17
|
+
connection_overrides: {
|
18
|
+
path: -> (connection_path) {
|
19
|
+
"#{connection_path}-migrator"
|
20
|
+
}
|
21
|
+
}
|
22
|
+
}
|
23
|
+
|
24
|
+
# Use a global connection for creating the database.
|
25
|
+
#
|
26
|
+
global_migrator = Pakyow::Data::Migrator.connect_global(opts)
|
27
|
+
|
28
|
+
# Create the migrator database unless it exists.
|
29
|
+
#
|
30
|
+
global_migrator.create!
|
31
|
+
|
32
|
+
# Use a normal migrator for migrating.
|
33
|
+
#
|
34
|
+
migrator = Pakyow::Data::Migrator.connect(opts)
|
35
|
+
|
36
|
+
# Run the existing migrations on it.
|
37
|
+
#
|
38
|
+
migrator.migrate!
|
39
|
+
|
40
|
+
# Create migrations for unmigrated schema.
|
41
|
+
#
|
42
|
+
migrator.finalize!
|
43
|
+
|
44
|
+
# Disconnect.
|
45
|
+
#
|
46
|
+
migrator.disconnect!
|
47
|
+
|
48
|
+
# Drop the migrator database.
|
49
|
+
#
|
50
|
+
global_migrator.drop!
|
51
|
+
|
52
|
+
# Disconnect the migrator database.
|
53
|
+
#
|
54
|
+
global_migrator.disconnect!
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "pakyow/data/migrator"
|
4
|
+
|
5
|
+
namespace :db do
|
6
|
+
desc "Migrate a database"
|
7
|
+
option :adapter, "The adapter to migrate"
|
8
|
+
option :connection, "The connection to migrate"
|
9
|
+
task :migrate, [:adapter, :connection] do |_, args|
|
10
|
+
Pakyow.config.data.auto_migrate = false
|
11
|
+
|
12
|
+
unless Pakyow.booted?
|
13
|
+
Pakyow.boot(unsafe: true)
|
14
|
+
end
|
15
|
+
|
16
|
+
migrator = Pakyow::Data::Migrator.connect(
|
17
|
+
adapter: args[:adapter],
|
18
|
+
connection: args[:connection]
|
19
|
+
)
|
20
|
+
|
21
|
+
migrator.migrate!
|
22
|
+
migrator.disconnect!
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "pakyow/data/migrator"
|
4
|
+
|
5
|
+
namespace :db do
|
6
|
+
desc "Reset a database"
|
7
|
+
option :adapter, "The adapter to migrate"
|
8
|
+
option :connection, "The connection to migrate"
|
9
|
+
task :reset, [:adapter, :connection] do |_, args|
|
10
|
+
%w[
|
11
|
+
db:drop
|
12
|
+
db:bootstrap
|
13
|
+
].each do |task|
|
14
|
+
Pakyow.logger.info "[db:reset] running: #{task}"
|
15
|
+
Rake::Task[task].invoke(args[:adapter], args[:connection])
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "dry-types"
|
4
|
+
|
5
|
+
module Pakyow
|
6
|
+
module Data
|
7
|
+
module Types
|
8
|
+
include Dry.Types(default: :nominal)
|
9
|
+
|
10
|
+
MAPPING = {
|
11
|
+
boolean: Bool.meta(mapping: :boolean),
|
12
|
+
date: Date.meta(mapping: :date),
|
13
|
+
datetime: DateTime.meta(mapping: :datetime),
|
14
|
+
decimal: Coercible::Decimal.meta(mapping: :decimal),
|
15
|
+
float: Coercible::Float.meta(mapping: :float),
|
16
|
+
integer: Coercible::Integer.meta(mapping: :integer),
|
17
|
+
string: Coercible::String.meta(mapping: :string),
|
18
|
+
time: Time.meta(mapping: :time)
|
19
|
+
}.freeze
|
20
|
+
|
21
|
+
def self.type_for(type, additional_types = {})
|
22
|
+
if type.is_a?(Dry::Types::Type)
|
23
|
+
type
|
24
|
+
else
|
25
|
+
type = type.to_sym
|
26
|
+
additional_types.to_h.fetch(type) {
|
27
|
+
MAPPING.fetch(type)
|
28
|
+
}
|
29
|
+
end
|
30
|
+
rescue KeyError => error
|
31
|
+
raise UnknownType.build(error, type: type, context: {
|
32
|
+
type: type, types: MAPPING.keys
|
33
|
+
})
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/lib/pakyow/data.rb
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "pakyow"
|
4
|
+
require "pakyow/routing"
|
5
|
+
|
6
|
+
require "pakyow/data/connection"
|
7
|
+
|
8
|
+
Pakyow::Data::Connection.register_adapter :sql
|
9
|
+
|
10
|
+
require "pakyow/data/errors"
|
11
|
+
require "pakyow/data/framework"
|
12
|
+
|
13
|
+
require "pakyow/environment/data/auto_migrate"
|
14
|
+
require "pakyow/environment/data/config"
|
15
|
+
require "pakyow/environment/data/connections"
|
16
|
+
require "pakyow/environment/data/memory_db"
|
17
|
+
|
18
|
+
require "pakyow/validations/unique"
|
19
|
+
|
20
|
+
module Pakyow
|
21
|
+
config.tasks.paths << File.expand_path("../data/tasks", __FILE__)
|
22
|
+
|
23
|
+
include Environment::Data::AutoMigrate
|
24
|
+
include Environment::Data::Config
|
25
|
+
include Environment::Data::Connections
|
26
|
+
include Environment::Data::MemoryDB
|
27
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "pakyow/support/extension"
|
4
|
+
|
5
|
+
module Pakyow
|
6
|
+
module Environment
|
7
|
+
module Data
|
8
|
+
module AutoMigrate
|
9
|
+
extend Support::Extension
|
10
|
+
|
11
|
+
apply_extension do
|
12
|
+
after "boot" do
|
13
|
+
if Pakyow.config.data.auto_migrate || Pakyow.config.data.auto_migrate_always.any?
|
14
|
+
require "pakyow/data/migrator"
|
15
|
+
|
16
|
+
@data_connections.values.flat_map(&:values)
|
17
|
+
.select(&:connected?)
|
18
|
+
.select(&:auto_migrate?)
|
19
|
+
.select { |connection|
|
20
|
+
Pakyow.config.data.auto_migrate || Pakyow.config.data.auto_migrate_always.include?(connection.name)
|
21
|
+
}.each do |auto_migratable_connection|
|
22
|
+
migrator = Pakyow::Data::Migrator.new(auto_migratable_connection)
|
23
|
+
migrator.auto_migrate!
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "pakyow/support/extension"
|
4
|
+
|
5
|
+
module Pakyow
|
6
|
+
module Environment
|
7
|
+
module Data
|
8
|
+
module Config
|
9
|
+
extend Support::Extension
|
10
|
+
|
11
|
+
apply_extension do
|
12
|
+
on "configure" do
|
13
|
+
# We have to define these in a before configure hook since new types could be added.
|
14
|
+
#
|
15
|
+
Pakyow.config.data.connections.instance_eval do
|
16
|
+
Pakyow::Data::Connection.adapter_types.each do |type|
|
17
|
+
setting type, {}
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
configurable :data do
|
23
|
+
setting :default_adapter, :sql
|
24
|
+
setting :default_connection, :default
|
25
|
+
|
26
|
+
setting :silent, true
|
27
|
+
setting :auto_migrate, true
|
28
|
+
setting :auto_migrate_always, [:memory]
|
29
|
+
setting :migration_path, "./database/migrations"
|
30
|
+
|
31
|
+
defaults :production do
|
32
|
+
setting :auto_migrate, false
|
33
|
+
end
|
34
|
+
|
35
|
+
configurable :subscriptions do
|
36
|
+
setting :adapter, :memory
|
37
|
+
setting :adapter_settings, {}
|
38
|
+
|
39
|
+
defaults :production do
|
40
|
+
setting :adapter, :redis
|
41
|
+
setting :adapter_settings do
|
42
|
+
Pakyow.config.redis.to_h
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
configurable :connections do
|
48
|
+
end
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,76 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "pakyow/support/extension"
|
4
|
+
|
5
|
+
require "pakyow/data/connection"
|
6
|
+
|
7
|
+
module Pakyow
|
8
|
+
module Environment
|
9
|
+
module Data
|
10
|
+
module Connections
|
11
|
+
extend Support::Extension
|
12
|
+
|
13
|
+
apply_extension do
|
14
|
+
class_state :data_connections, default: {}
|
15
|
+
|
16
|
+
class << self
|
17
|
+
# @api private
|
18
|
+
def connection(adapter, connection)
|
19
|
+
adapter ||= Pakyow.config.data.default_adapter
|
20
|
+
connection ||= Pakyow.config.data.default_connection
|
21
|
+
unless connection_instance = Pakyow.data_connections.dig(adapter.to_sym, connection.to_sym)
|
22
|
+
# TODO: see if this bubbles up to a level the user can see (e.g. specify in the source)
|
23
|
+
# okay, this is used to fetch a connection through the cli... maybe see if we can reuse when finding the connection for a source too
|
24
|
+
#
|
25
|
+
raise ArgumentError, "`#{connection}' is not a known database connection for the #{adapter} adapter"
|
26
|
+
end
|
27
|
+
|
28
|
+
connection_instance
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
on "boot", "boot.data.connections" do
|
33
|
+
# Disconnect any existing connections (e.g. booted twice for some reason).
|
34
|
+
#
|
35
|
+
@data_connections.values.flat_map(&:values).each(&:disconnect)
|
36
|
+
|
37
|
+
# Create new connections.
|
38
|
+
#
|
39
|
+
@data_connections = Pakyow::Data::Connection.adapter_types.each_with_object({}) { |connection_type, connections|
|
40
|
+
connections[connection_type] = Pakyow.config.data.connections.public_send(connection_type).each_with_object({}) { |(connection_name, connection_string), adapter_connections|
|
41
|
+
extra_options = {}
|
42
|
+
|
43
|
+
unless Pakyow.config.data.silent
|
44
|
+
extra_options[:logger] = Pakyow.logger
|
45
|
+
end
|
46
|
+
|
47
|
+
connection = Pakyow::Data::Connection.new(
|
48
|
+
string: connection_string,
|
49
|
+
type: connection_type,
|
50
|
+
name: connection_name,
|
51
|
+
**extra_options
|
52
|
+
)
|
53
|
+
|
54
|
+
if connection.failed?
|
55
|
+
raise connection.failure
|
56
|
+
else
|
57
|
+
adapter_connections[connection_name] = connection
|
58
|
+
end
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
62
|
+
# Register a prelaunch task to migrate every migratable connection.
|
63
|
+
#
|
64
|
+
@data_connections.each do |adapter, connections|
|
65
|
+
connections.each do |connection_name, connection|
|
66
|
+
if connection.migratable? && connection_name != :memory
|
67
|
+
config.tasks.prelaunch << ["db:migrate", { adapter: adapter, connection: connection_name }]
|
68
|
+
end
|
69
|
+
end
|
70
|
+
end
|
71
|
+
end
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "pakyow/support/extension"
|
4
|
+
|
5
|
+
module Pakyow
|
6
|
+
module Environment
|
7
|
+
module Data
|
8
|
+
# Configures an in-memory sqlite database.
|
9
|
+
#
|
10
|
+
module MemoryDB
|
11
|
+
extend Support::Extension
|
12
|
+
|
13
|
+
apply_extension do
|
14
|
+
after "configure" do
|
15
|
+
if defined?(SQLite3)
|
16
|
+
config.data.connections.sql[:memory] = "sqlite::memory"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "pakyow/validator"
|
4
|
+
|
5
|
+
module Pakyow
|
6
|
+
module Validations
|
7
|
+
# Validates that the value is unique within its data source.
|
8
|
+
#
|
9
|
+
# @api public
|
10
|
+
module Unique
|
11
|
+
def self.name
|
12
|
+
:unique
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.message(**)
|
16
|
+
"must be unique"
|
17
|
+
end
|
18
|
+
|
19
|
+
def self.valid?(value, source:, **options)
|
20
|
+
options[:context].app.data.public_send(source).public_send(:"by_#{options[:key]}", value).count == 0
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
Validator.register_validation(Unique)
|
25
|
+
end
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,186 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: pakyow-data
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.rc1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Bryan Powell
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-07-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: pakyow-core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.0.0.rc1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.0.0.rc1
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pakyow-support
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 1.0.0.rc1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 1.0.0.rc1
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: concurrent-ruby
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.1'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.1'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: connection_pool
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.2'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '2.2'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: dry-types
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: sequel
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '5.20'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '5.20'
|
97
|
+
description: Data persistence layer for Pakyow
|
98
|
+
email: bryan@metabahn.com
|
99
|
+
executables: []
|
100
|
+
extensions: []
|
101
|
+
extra_rdoc_files: []
|
102
|
+
files:
|
103
|
+
- CHANGELOG.md
|
104
|
+
- LICENSE
|
105
|
+
- README.md
|
106
|
+
- lib/pakyow/data.rb
|
107
|
+
- lib/pakyow/data/adapters/abstract.rb
|
108
|
+
- lib/pakyow/data/adapters/sql.rb
|
109
|
+
- lib/pakyow/data/adapters/sql/commands.rb
|
110
|
+
- lib/pakyow/data/adapters/sql/dataset_methods.rb
|
111
|
+
- lib/pakyow/data/adapters/sql/differ.rb
|
112
|
+
- lib/pakyow/data/adapters/sql/migrator.rb
|
113
|
+
- lib/pakyow/data/adapters/sql/migrator/adapter_methods.rb
|
114
|
+
- lib/pakyow/data/adapters/sql/migrators/automator.rb
|
115
|
+
- lib/pakyow/data/adapters/sql/migrators/finalizer.rb
|
116
|
+
- lib/pakyow/data/adapters/sql/runner.rb
|
117
|
+
- lib/pakyow/data/adapters/sql/source_extension.rb
|
118
|
+
- lib/pakyow/data/adapters/sql/types.rb
|
119
|
+
- lib/pakyow/data/behavior/config.rb
|
120
|
+
- lib/pakyow/data/behavior/lookup.rb
|
121
|
+
- lib/pakyow/data/behavior/serialization.rb
|
122
|
+
- lib/pakyow/data/connection.rb
|
123
|
+
- lib/pakyow/data/container.rb
|
124
|
+
- lib/pakyow/data/errors.rb
|
125
|
+
- lib/pakyow/data/framework.rb
|
126
|
+
- lib/pakyow/data/helpers.rb
|
127
|
+
- lib/pakyow/data/lookup.rb
|
128
|
+
- lib/pakyow/data/migrator.rb
|
129
|
+
- lib/pakyow/data/object.rb
|
130
|
+
- lib/pakyow/data/proxy.rb
|
131
|
+
- lib/pakyow/data/result.rb
|
132
|
+
- lib/pakyow/data/sources/abstract.rb
|
133
|
+
- lib/pakyow/data/sources/ephemeral.rb
|
134
|
+
- lib/pakyow/data/sources/relational.rb
|
135
|
+
- lib/pakyow/data/sources/relational/association.rb
|
136
|
+
- lib/pakyow/data/sources/relational/associations/belongs_to.rb
|
137
|
+
- lib/pakyow/data/sources/relational/associations/has_many.rb
|
138
|
+
- lib/pakyow/data/sources/relational/associations/has_one.rb
|
139
|
+
- lib/pakyow/data/sources/relational/associations/through.rb
|
140
|
+
- lib/pakyow/data/sources/relational/command.rb
|
141
|
+
- lib/pakyow/data/sources/relational/migrator.rb
|
142
|
+
- lib/pakyow/data/subscribers.rb
|
143
|
+
- lib/pakyow/data/subscribers/adapters/memory.rb
|
144
|
+
- lib/pakyow/data/subscribers/adapters/redis.rb
|
145
|
+
- lib/pakyow/data/subscribers/adapters/redis/pipeliner.rb
|
146
|
+
- lib/pakyow/data/subscribers/adapters/redis/scripts/_shared.lua
|
147
|
+
- lib/pakyow/data/subscribers/adapters/redis/scripts/expire.lua
|
148
|
+
- lib/pakyow/data/subscribers/adapters/redis/scripts/persist.lua
|
149
|
+
- lib/pakyow/data/subscribers/adapters/redis/scripts/register.lua
|
150
|
+
- lib/pakyow/data/tasks/bootstrap.rake
|
151
|
+
- lib/pakyow/data/tasks/create.rake
|
152
|
+
- lib/pakyow/data/tasks/drop.rake
|
153
|
+
- lib/pakyow/data/tasks/finalize.rake
|
154
|
+
- lib/pakyow/data/tasks/migrate.rake
|
155
|
+
- lib/pakyow/data/tasks/reset.rake
|
156
|
+
- lib/pakyow/data/types.rb
|
157
|
+
- lib/pakyow/environment/data/auto_migrate.rb
|
158
|
+
- lib/pakyow/environment/data/config.rb
|
159
|
+
- lib/pakyow/environment/data/connections.rb
|
160
|
+
- lib/pakyow/environment/data/memory_db.rb
|
161
|
+
- lib/pakyow/validations/unique.rb
|
162
|
+
homepage: https://pakyow.org
|
163
|
+
licenses:
|
164
|
+
- LGPL-3.0
|
165
|
+
metadata: {}
|
166
|
+
post_install_message:
|
167
|
+
rdoc_options: []
|
168
|
+
require_paths:
|
169
|
+
- lib
|
170
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
171
|
+
requirements:
|
172
|
+
- - ">="
|
173
|
+
- !ruby/object:Gem::Version
|
174
|
+
version: 2.5.0
|
175
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
|
+
requirements:
|
177
|
+
- - ">"
|
178
|
+
- !ruby/object:Gem::Version
|
179
|
+
version: 1.3.1
|
180
|
+
requirements: []
|
181
|
+
rubyforge_project:
|
182
|
+
rubygems_version: 2.7.6
|
183
|
+
signing_key:
|
184
|
+
specification_version: 4
|
185
|
+
summary: Pakyow Data
|
186
|
+
test_files: []
|