dataMetaDom 1.0.4 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80951cc7ea0ae6737628ea190af63decd6950a78
4
- data.tar.gz: 001d5ed875e1e4f3efb9e6434c04a7bab48b63fe
3
+ metadata.gz: 00be7044d2c3f2305152056593942faaa2d606ce
4
+ data.tar.gz: d067f88807ff480fa15e59a0a5139ecc08bd2721
5
5
  SHA512:
6
- metadata.gz: 56763e13bed0af069dba5080da448abf3412609ea29f7dad0f3e28d764a03a2ecffcae86d03d55345feb9dcd5236f00083c1f71a5221b135cde31728d0d21249
7
- data.tar.gz: fe1042c5fdce7d91dacc7f7de1599b3117073466cd1e7d7a9c837e23c4b04c6e0ae3c18c6a45e80a4a61a2231cc7c25939c78116ca2a035962a973269e4ef873
6
+ metadata.gz: 8389e73f9f9915da9c584e0c989b238e926ef3c7a206c302ab7bbfc6b45f507f2363356ba1c8285ccd6d21730e4245ba2a34e4ad7d7ab22b3f31f57376c38793
7
+ data.tar.gz: cfe41be39d9a0e0a04970c7cde983d60cc2a960c44bdce55fbeb4cfa4c15ff3dbef161951ffa0229e2a150cc17db04338a35981f1c7c5e2c66e1145cdd815733
data/History.md CHANGED
@@ -1,6 +1,14 @@
1
1
 
2
2
  # `dataMetaDom` Release history:
3
3
 
4
+ ## `1.0.6` - `2017-04-03 Mon` by [`mub`](https://github.com/mub)
5
+ * Bug fix:
6
+ * Pojo Generator had autoversion parameter misspelled.
7
+
8
+ ## `1.0.5` - `2017-03-06 Mon` by [`mub`](https://github.com/mub)
9
+ * Updates:
10
+ * Added the URL and RAW types to MySQL generator
11
+
4
12
  ## `1.0.4` - `2017-02-28 Tue` by [`mub`](https://github.com/mub)
5
13
  * Updates:
6
14
  * Adjusted Mapping and Bitset generation target package
@@ -42,7 +42,7 @@ Reverse references keyed by reference target names
42
42
  =begin
43
43
  Documentation for all options is in this section.
44
44
 
45
- * +autoNsVer+ - if set to True, advises a generator to append a +vN+ where +N+ is a version number to the namespace.
45
+ * +autoVerNs+ - if set to True, advises a generator to append a +vN+ where +N+ is a version number to the namespace.
46
46
  =end
47
47
  attr_accessor :options
48
48
  # Version on the model level
@@ -45,6 +45,14 @@ Not null (required) wording per MySQL DDL syntax
45
45
  },
46
46
  STRING => lambda { |len, isReq| "varchar(#{len})#{isReq ? NOT_NULL : ''}" },
47
47
  DATETIME => lambda { |len, isReq| "datetime#{isReq ? NOT_NULL : ''}" },
48
+ RAW => lambda { |len, isReq| "varbinary(#{len})#{isReq ? NOT_NULL : ''}" },
49
+
50
+ # Regarding the URL length:
51
+ # https://support.microsoft.com/en-us/help/208427/maximum-url-length-is-2,083-characters-in-internet-explorer
52
+ # https://tools.ietf.org/html/rfc7230#section-3.1.1
53
+ # http://www.faqs.org/rfcs/rfc2616.html
54
+ URL => lambda { |len, isReq| "varchar(2083)#{isReq ? NOT_NULL : ''}" },
55
+
48
56
  BOOL => lambda { |len, isReq| "bool#{isReq ? NOT_NULL : ''}" }
49
57
  }
50
58
 
@@ -206,15 +214,15 @@ Render SQL record with for the given model into the given output.
206
214
  }
207
215
  ids = record.identity ? record.identity.args : []
208
216
  createStatement = "create table #{entityName} (\n"
209
- fieldKeys = [] << ids.map { |i| i.to_s }.sort.map { |i| i.to_sym } \
210
- << record.fields.keys.select { |k| !ids.include?(k) }.map { |k| k.to_s }.sort.map { |k| k.to_sym }
217
+ fieldKeys = [] << ids.map { |i| i.to_s }.map { |i| i.to_sym } \
218
+ << record.fields.keys.select { |k| !ids.include?(k) }.map { |k| k.to_s }.map { |k| k.to_sym }
211
219
 
212
220
  fieldKeys.flatten.each { |f|
213
221
  renderField(createStatement, parser, record, f, isFirstField)
214
222
  isFirstField = false
215
223
  }
216
224
  if record.identity && record.identity.length > 0
217
- createStatement << ",\n\tprimary key(#{ids.sort.join(', ')})"
225
+ createStatement << ",\n\tprimary key(#{ids.join(', ')})"
218
226
  end
219
227
  unless record.uniques.empty?
220
228
  uqNumber = 1
data/lib/dataMetaDom.rb CHANGED
@@ -25,7 +25,7 @@ For command line details either check the new method's source or the README.rdoc
25
25
  module DataMetaDom
26
26
 
27
27
  # Current version
28
- VERSION = '1.0.4'
28
+ VERSION = '1.0.6'
29
29
 
30
30
  =begin rdoc
31
31
  Quick and dirty turning a Windows path into a path of the platform on which this script is running.
@@ -49,7 +49,7 @@ end
49
49
 
50
50
  # adjust the namespace if required
51
51
  def nsAdjustment(namespace, options, src)
52
- src && options[:autoNsVer] ? "#{namespace}.v#{src.ver.full.toVarName}" : namespace
52
+ src && options[:autoVerNs] ? "#{namespace}.v#{src.ver.full.toVarName}" : namespace
53
53
  end
54
54
 
55
55
  =begin rdoc
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dataMetaDom
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Bergens
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-15 00:00:00.000000000 Z
11
+ date: 2017-04-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dataMetaXtra