jungle_path 0.0.17 → 0.0.18

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: edcaf45d561ae6cdd0d1d54cc4414016a26bbb36
4
- data.tar.gz: f02560ab2a92c1038db96bc68fccf0c87b8949c1
3
+ metadata.gz: 05a1ee3df63deeb1e7c4d545e39416d03999781d
4
+ data.tar.gz: 7437c7edea7eacb9a027246802c2784a16954a47
5
5
  SHA512:
6
- metadata.gz: ad6b3ca842bfefa901b40a45333f59ae42ff9431014bbfc08fb2bcbc8e8400bd526b34fc4e21f21cce41116c06a7aae4c3206ae108b224a9322a4f543060bf4d
7
- data.tar.gz: ec339573a62774f4d18b4eb4bdaa4d41a291457dc60c6f67559ec2b4b2b42d394c5e35e18e1e3ce1906593893da726736d393dfb959a6ddee78ae669a25daca1
6
+ metadata.gz: 65a4efc0efd4765a66499a3a9e2a7dfaa406b87640efa6d0581e4228b08acb15c51d92c9da66cedba9a7c37853f55cfb11e028e250f21e4ce768fe7631668cda
7
+ data.tar.gz: a4674549debf2a9543f6c5a109e3dd821e568d9d77d444b3fc8890a6012d81aa5cc55f0942e5390043be2c0083ba58c7bf29cfc8244cee514dc5ff51cd10bd7f
@@ -6,9 +6,9 @@ module JunglePath
6
6
  @db = db
7
7
  end
8
8
 
9
- def get_sequel_method type
9
+ def get_sequel_method type, multi_column_pk=false
10
10
  return 'foreign_key' if type == :foreign_key
11
- return 'primary_key' if type == :primary_key
11
+ return 'primary_key' if type == :primary_key and multi_column_pk == false
12
12
  return 'String' if type == :string
13
13
  return 'Integer' if type == :integer
14
14
  return 'DateTime' if type == :timestamp
@@ -45,7 +45,7 @@ module JunglePath
45
45
  made_pk = false
46
46
  table_class.columns.each_value do |column|
47
47
  puts "\tcolumn: #{column.name} #{schema.get_sequel_method(column.type)} #{column.foreign_key_table_name}."
48
- method = schema.get_sequel_method(column.type)
48
+ method = schema.get_sequel_method(column.type, (table_class.primary_key_columns.count > 1))
49
49
  args_hash = {}
50
50
  if column.foreign_key? and column.not_null?
51
51
  #args = [column.name, column.foreign_key_table_name, :null=>false]
@@ -1,3 +1,3 @@
1
1
  module JunglePath
2
- VERSION = '0.0.17'
2
+ VERSION = '0.0.18'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jungle_path
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael VanZant
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-19 00:00:00.000000000 Z
11
+ date: 2017-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler