pg_graph 0.3.5 → 0.4.0

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
  SHA256:
3
- metadata.gz: d6b2edcd76a35c76a8c18ca94f2e81416e8a5b1c12aa6688937216bf45250eb2
4
- data.tar.gz: 30bd02185aa89f1fa561e67bbced8bbdea4b69940f6790fdddf0edb037c49d2e
3
+ metadata.gz: 45928a90edcb72e3910365c81a2a18876044ced33ed44d9b9227cac0e3e9d712
4
+ data.tar.gz: 9b75a3ee1a45dede71405e1bf7b1832aecad8f515c02e1e6e34f175f4ad3f5f4
5
5
  SHA512:
6
- metadata.gz: 1543e51a4838a9f5818abeef4cf9e2dbd213b693ac88af40ccc0744ec58bcb97ebe3c00f6b7f7f23174c5a285402e6a51eb07c36bbed7800c2d2654dd9a6cc37
7
- data.tar.gz: b246237fe7b0df971c6400cd12e17cad876d7514164c1f03de6a9167ac6e5f8dd0be6154c806dcafe7bcc7284da39fca35395dbcd01262c126fb63caa10c5c28
6
+ metadata.gz: 726bf17e1965dc49ffb0b237ee0409e7f788ce517e2c5b4ee445697d5a48180dc9f3833e29ca188e429ce910521fb0583aab6309edd81d21d5b4bc8399ecb51e
7
+ data.tar.gz: 0dfc4dc3f9985010fe71af934840bfdce36aa00f5aa59c37dbb331d6b4faf3a7610f7f4daa78e75219906c5b7a86164b4a0bff338492c277bb526e1aeeb6526c
data/doc/diagram.drawio CHANGED
@@ -1 +1 @@
1
- <mxfile host="Electron" modified="2021-06-19T19:00:11.786Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/14.5.1 Chrome/89.0.4389.82 Electron/12.0.1 Safari/537.36" etag="VEebFTCiVobfmwhjoPcL" version="14.5.1" type="device" pages="4"><diagram name="PgGraph::Type" id="cKRLOOJVSauCXKW0aq4U">7V1dm5q6Fv41Xrof+cbLcey0z+7u7rTTfc7puemDEpUpGIs4Ov31m49EYYESGRCMmYtWYlgS8r5rrays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7pbHKZLnwQ/ZUg/C1gUecMVE8xZsR0Kx4ZV2C+2BmAYj7P/8WTjhlP2bTb1eFs8lrhlQpcEjEya6Xv8Rwltxag/vHmQ2/h+vZzVc1xFz7dKXqZSCXyiDDNMtYbFUZ3b+rLM1h7POIJAYeyF4z3cjfEsyLleFXgqVFn13rE7ARVz4lkRoXyCyAN7tDCBj3BWHKZpWEwClJYBdaPkXqbz7BhxKYRrcg/BKWBXjQTSWW6tiC68hJGVOYi6LTyzqfnexetOacUCM2WgMXRHJ4UFRtnNd1qGo4LmIOmbSa05yRcyKXGg/nLBFKgRZS7YkfE5pp9wboGjKvWfIippmRfKxYnTcEZ48wYpTxfCLYNDF23cyVjFDDx/a1NXGqqWfzhY0muBfYalUSknsPsBgE38pxykvPVtRU245dtp9qIjYVtqjp11WYr/aNqHK904Z8UPJ4hVSsTkgl3+WzgXjwfZvCRTWdVg02z60a1DXVjP3LWdMx1TjYaZlqcAdUM2Gbi046pRNXO10s99w6sTugkylbimUKwUUsnRIL6jstE4vTBbFEdyRO6eVzS7fEot/AHO/cYnEPiEVbNkjCQfaCUrYSJtnbKHRhDeHey8lj6iTDsBUP4GUxC8lLEC+dkPt1r9XVOVDWEuNApVDXzRwO1VpFmDIis6uWFePmhQHZ2nIVaapR9XeXuiNPu3n0NUdFHfYc5UtfpX06G7yOsME0zsiGnttcRBefyAbPajqqdosPYkO/5Wwwj2TDM3vyB7Gh/1ZssM/LhpKMraUD/hR0QNpR0TuRDr2e5gh9MB0O/Z+gTXRAR9IBn5MOSDvwbV3UR98ctCuIrW8z702HQ6/yPiMdWnWRdKxT6aDzSv8A8d50OPTGqk10sD/l7nDqYbG3O7zZYSGbu2+GFOa779fg6/8=</diagram></mxfile>
1
+ <mxfile host="Electron" modified="2023-12-17T05:00:21.171Z" agent="5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/14.5.1 Chrome/89.0.4389.82 Electron/12.0.1 Safari/537.36" etag="McMkOBbJ6DXex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bNkjCQfaCUrYSJtnbKHRhDeHey8lj6iTDsBUP4GUxC8lLEC+dkPt1r9XVOVDWEuNApVDXzRwO1VpFmDIis6uWFePmhQHZ2nIVaapR9XeXuiNPu3n0NUdFHfYc5UtfpX06G7yOsME0zsiGnttcRBefyAbPajqqdosPYkO/5Wwwj2TDM3vyB7Gh/1ZssM/LhpKMraUD/hR0QNpR0TuRDr2e5gh9MB0O/Z+gTXRAR9IBn5MOSDvwbV3UR98ctCuIrW8z702HQ6/yPiMdWnWRdKxT6aDzSv8A8d50OPTGqk10sD/l7nDqYbG3O7zZYSGbu2+GFOa779fg6/8=</diagram></mxfile>
data/lib/data/render.rb CHANGED
@@ -211,7 +211,7 @@ module PgGraph::Data
211
211
 
212
212
  def render_restart_sequences()
213
213
  @tables.map { |table|
214
- if table.type.subtable?
214
+ if table.type.sub_table?
215
215
  nil
216
216
  elsif table.empty? && @with_deletes || !table.empty? && table.max_id > @ids[table.uid]
217
217
  "alter table #{table.uid} alter column id restart with #{table.max_id+1};"
@@ -1,3 +1,3 @@
1
1
  module PgGraph
2
- VERSION = "0.3.5"
2
+ VERSION = "0.4.0"
3
3
  end
@@ -2,8 +2,8 @@ require 'indented_io'
2
2
 
3
3
  module PgGraph::Type
4
4
  class Node
5
- def dump(children = self.children.values.sort_by(&:name), link_info: false, supertable: nil)
6
- print identifier + (supertable ? " < #{supertable}" : "")
5
+ def dump(children = self.children.values.sort_by(&:name), link_info: false, super_table: nil)
6
+ print identifier + (super_table ? " < #{super_table}" : "")
7
7
  puts
8
8
  indent { children.each { |child| child.dump(link_info: link_info) } }
9
9
  end
@@ -17,11 +17,11 @@ module PgGraph::Type
17
17
 
18
18
  class RecordType
19
19
  def dump(**opts)
20
- supertable = table.supertable&.identifier
20
+ super_table = table.super_table&.identifier
21
21
  columns = fields.reject { |column|
22
22
  column.primary_key? || column.name =~ /_id$/ || column.name =~ /_kind$/ # FIXME
23
23
  }
24
- super(columns, supertable: supertable, **opts)
24
+ super(columns, super_table: super_table, **opts)
25
25
  end
26
26
  end
27
27
 
data/lib/type/read.rb CHANGED
@@ -179,19 +179,13 @@ module PgGraph::Type
179
179
  end
180
180
  }
181
181
 
182
- # Setup super/subtables
182
+ # Setup super/sub_tables
183
183
  id_link_columns.each { |this_record_type, meta_column|
184
184
  # Create forward and backward references for id links
185
185
  constraint = meta_column.references.first
186
186
  that_record_type = dot(constraint.referenced_table.path).type.record_type
187
187
  SuperRecordColumn.new(this_record_type, that_record_type)
188
188
  SubRecordColumn.new(that_record_type, this_record_type)
189
-
190
- # Create hierarchy
191
- this_table = this_record_type.table
192
- that_table = that_record_type.table
193
- this_table.instance_variable_set(:@supertable, that_table)
194
- that_table.instance_variable_set(:@has_subtables, true)
195
189
  }
196
190
 
197
191
  # Create N:M or M:M reference fields
data/lib/type/type.rb CHANGED
@@ -152,14 +152,17 @@ module PgGraph::Type
152
152
 
153
153
  forward_method :type, :keys, :fields, :key?, :[], :columns, :value_columns, :column?
154
154
 
155
- # Parent table if table is a derived table and otherwise nil. Initialized by #read
156
- attr_reader :supertable
155
+ # True if table is a derived table. TODO: Use sub_table etc.
156
+ def sub_table?() !super_table.nil? end
157
157
 
158
- # True if table is a parent table. Initialized by #read
159
- def supertable?() @has_subtables || false end
158
+ # Parent table if this table is a derived table and otherwise nil
159
+ def super_table = record_type.super_record&.table
160
+
161
+ # Recursive parent table if table is a derived table and otherwise nil
162
+ def root_table = record_type.root_record&.table
160
163
 
161
- # True if table is a derived table
162
- def subtable?() !@supertable.nil? end
164
+ # True if table is a parent table. Initialized by #read
165
+ def super_table?() record_type.sub_record? end
163
166
 
164
167
  def mm_table?() @mm_table end
165
168
  def nm_table?() @nm_table end
@@ -231,6 +234,53 @@ module PgGraph::Type
231
234
  class RecordType < CompositeType
232
235
  include TableObject
233
236
 
237
+ # Associated Table object
238
+ attr_reader :table
239
+
240
+ # Redefine array_type
241
+ def array_type() table_type end
242
+
243
+ def super_record()
244
+ (@super_record_initialized && @super_record) or begin
245
+ @super_record_initialized = true
246
+ @super_record = fields.find { |field| field.is_a?(SuperRecordColumn) }&.type
247
+ end
248
+ end
249
+
250
+ def root_record()
251
+ (@root_record_initialized && @root_record) or begin
252
+ @root_record_initialized = true
253
+ @root_record = super_record
254
+ while @root_record&.super_record
255
+ @root_record = @root_record.super_record
256
+ end
257
+ @root_record
258
+ end
259
+ end
260
+
261
+ def sub_record?
262
+ (@sub_record_initialized && sub_record) or begin
263
+ @sub_record_initialized = true
264
+ @sub_record = fields.find { |field| field.is_a?(SubRecordColumn) } && true || false
265
+ end
266
+ end
267
+
268
+ # A record type has the schema as parent. Note that a record is
269
+ # initialized with a Table object and not a TableType object
270
+ def initialize(table)
271
+ constrain table, Table
272
+ super(table.schema, PgGraph.inflector.table2record_type(table.name))
273
+ @table = table
274
+ table_type = TableType.new(table.schema, self) # FIXME
275
+ @table.send(:type=, table_type)
276
+ @super_record_initialized = false
277
+ end
278
+
279
+ def attach(*args)
280
+ @columns = nil
281
+ super
282
+ end
283
+
234
284
  # List of postgres columns. The columns are sorted by ordinal
235
285
  def columns()
236
286
  @columns ||= begin
@@ -287,8 +337,6 @@ module PgGraph::Type
287
337
 
288
338
  end
289
339
 
290
- # field.is_a?(SimpleColumn) || field.is_a?(KindReference}.sort_by(&:ordinal) end
291
-
292
340
  # List of columns excluding generated fields
293
341
  def value_columns()
294
342
  columns.select { |column| !column.generated? }
@@ -301,26 +349,6 @@ module PgGraph::Type
301
349
  @columns_hash.key?(name)
302
350
  end
303
351
 
304
- # Associated Table object
305
- attr_reader :table
306
-
307
- # Redefine array_type
308
- def array_type() table_type end
309
-
310
- # A record type has the schema as parent. Note that a record is
311
- # initialized with a Table object and not a TableType object
312
- def initialize(table)
313
- constrain table, Table
314
- super(table.schema, PgGraph.inflector.table2record_type(table.name))
315
- @table = table
316
- table_type = TableType.new(table.schema, self) # FIXME
317
- @table.send(:type=, table_type)
318
- end
319
-
320
- def attach(*args)
321
- @columns = nil
322
- super
323
- end
324
352
  end
325
353
 
326
354
  class ArrayType < Type
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_graph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claus Rasmussen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-16 00:00:00.000000000 Z
11
+ date: 2023-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: boolean
@@ -240,7 +240,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
240
240
  - !ruby/object:Gem::Version
241
241
  version: '0'
242
242
  requirements: []
243
- rubygems_version: 3.3.7
243
+ rubygems_version: 3.3.18
244
244
  signing_key:
245
245
  specification_version: 4
246
246
  summary: Create graph type model of database