sunstone 6.0.0.4 → 6.1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/main.yml +141 -0
- data/README.md +39 -3
- data/ext/active_record/associations.rb +2 -2
- data/ext/active_record/attribute_methods.rb +2 -2
- data/ext/active_record/callbacks.rb +1 -1
- data/ext/active_record/finder_methods.rb +40 -35
- data/ext/active_record/persistence.rb +2 -0
- data/ext/active_record/relation/calculations.rb +2 -2
- data/ext/active_record/statement_cache.rb +9 -5
- data/ext/active_record/transactions.rb +8 -15
- data/ext/arel/attributes/empty_relation.rb +31 -31
- data/ext/arel/nodes/select_statement.rb +1 -1
- data/lib/active_record/connection_adapters/sunstone/column.rb +2 -2
- data/lib/active_record/connection_adapters/sunstone/database_statements.rb +5 -5
- data/lib/active_record/connection_adapters/sunstone/schema_statements.rb +18 -8
- data/lib/active_record/connection_adapters/sunstone/type/binary.rb +34 -0
- data/lib/active_record/connection_adapters/sunstone_adapter.rb +39 -26
- data/lib/arel/visitors/sunstone.rb +13 -37
- data/lib/sunstone.rb +16 -2
- data/lib/sunstone/connection.rb +1 -1
- data/lib/sunstone/version.rb +1 -1
- data/sunstone.gemspec +3 -2
- data/test/active_record/persistance_test.rb +31 -6
- data/test/active_record/query_test.rb +9 -1
- data/test/schema_mock.rb +30 -26
- data/test/sunstone/connection/column_definition_test.rb +30 -0
- data/test/test_helper.rb +1 -0
- metadata +28 -12
- data/.travis.yml +0 -49
- data/ext/arel/attributes/relation.rb +0 -31
data/.travis.yml
DELETED
@@ -1,49 +0,0 @@
|
|
1
|
-
dist: xenial
|
2
|
-
language: ruby
|
3
|
-
sudo: false
|
4
|
-
|
5
|
-
cache:
|
6
|
-
bundler: true
|
7
|
-
directories:
|
8
|
-
- /home/travis/.rvm/gems
|
9
|
-
|
10
|
-
rvm:
|
11
|
-
- 2.6
|
12
|
-
|
13
|
-
env:
|
14
|
-
matrix:
|
15
|
-
- RAILS_VERSION=v6.0.0.rc1 GEM=activerecord:mysql2
|
16
|
-
- RAILS_VERSION=v6.0.0.rc1 GEM=activerecord:sqlite3
|
17
|
-
- RAILS_VERSION=v6.0.0.rc1 GEM=activerecord:postgresql
|
18
|
-
|
19
|
-
services:
|
20
|
-
- mysql
|
21
|
-
addons:
|
22
|
-
postgresql: "10"
|
23
|
-
|
24
|
-
before_install:
|
25
|
-
- unset BUNDLE_GEMFILE
|
26
|
-
- gem update --system
|
27
|
-
- gem update bundler
|
28
|
-
|
29
|
-
install:
|
30
|
-
- git clone --branch $RAILS_VERSION https://github.com/rails/rails.git ~/build/rails
|
31
|
-
|
32
|
-
before_script:
|
33
|
-
- sed -i "s/t.warning = true/t.warning = false/g" Rakefile
|
34
|
-
- pushd ~/build/rails
|
35
|
-
- git status
|
36
|
-
- sed -i "s/Gem.ruby, '-w'/Gem.ruby, '-w0'/" ~/build/rails/activerecord/Rakefile
|
37
|
-
- sed -i "s/t.warning = true/t.warning = false/g" ~/build/rails/activerecord/Rakefile
|
38
|
-
- sed -i "/require 'support\/connection'/a \$LOAD_PATH.unshift\(File.expand_path\('~\/build\/malomalo\/sunstone\/lib'\)\)\nrequire 'sunstone'" ~/build/rails/activerecord/test/cases/helper.rb
|
39
|
-
- cat ~/build/rails/Gemfile
|
40
|
-
- rm ~/build/rails/Gemfile.lock
|
41
|
-
- "sed -i \"/# Active Record./a gem 'sunstone', path: File.expand_path\\('~\\/build\\/malomalo\\/sunstone'\\)\" ~/build/rails/Gemfile"
|
42
|
-
- cat ~/build/rails/Gemfile
|
43
|
-
- bundle update --jobs=3 --retry=3
|
44
|
-
- popd
|
45
|
-
- bundle install --jobs=3 --retry=3
|
46
|
-
|
47
|
-
script:
|
48
|
-
- bundle exec rake test
|
49
|
-
- cd ~/build/rails && ci/travis.rb
|
@@ -1,31 +0,0 @@
|
|
1
|
-
module Arel
|
2
|
-
module Attributes
|
3
|
-
class Relation < Attribute
|
4
|
-
|
5
|
-
attr_accessor :collection, :for_write
|
6
|
-
|
7
|
-
def initialize(relation, name, collection = false, for_write=false)
|
8
|
-
self[:relation] = relation
|
9
|
-
self[:name] = name
|
10
|
-
@collection = collection
|
11
|
-
@for_write = for_write
|
12
|
-
end
|
13
|
-
|
14
|
-
def able_to_type_cast?
|
15
|
-
false
|
16
|
-
end
|
17
|
-
|
18
|
-
def table_name
|
19
|
-
nil
|
20
|
-
end
|
21
|
-
|
22
|
-
def eql? other
|
23
|
-
self.class == other.class &&
|
24
|
-
self.relation == other.relation &&
|
25
|
-
self.name == other.name &&
|
26
|
-
self.collection == other.collection
|
27
|
-
end
|
28
|
-
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|