meta-record 1.0.16 → 1.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
  SHA256:
3
- metadata.gz: 3000969ca50942749e732bb338350bacef3ea660a861ec74d1d845b88ead8af8
4
- data.tar.gz: 5beb4157c5a4b5c8e456a6366ea16819d633cb06a73d8534f11503185677901d
3
+ metadata.gz: 79471cf609ea637059c8bef598aa0484f9729476c2b7277cda414481fbb7a214
4
+ data.tar.gz: 5976e4bc3870e9df2297975582c875be4312b55e32d8c9bfa3d26ee6c4a67f6b
5
5
  SHA512:
6
- metadata.gz: 3e8656f27f67acd03de31b1145bf49b9cd433b611fa2b8acfd061ffe8c8e6495496ff90268c59a316657c4450f4939ca28d02b4ad087a0d72cbe97c57fbace0c
7
- data.tar.gz: 2b9d0637c25e31c55cde76b2e18fc9941a74deefed9f8c6664062dfa93e7d20ea8d19db57759179ec0053598229a2eafa03abceb9b425e2232f79cf19a76d304
6
+ metadata.gz: 4353fabb23afb8ba99c16ad5130eef19d5a7cd8907fc2f8e81306b981624fbd0961e8cfac3aee35a8962d8c7d4b97674395bb8e2bb69c0002e30b503f50f62d7
7
+ data.tar.gz: 05b2c818089d6de641da135b58dda38c431855d4e7aa2e251f88713d43836ac614a032ddcd58d8a281ec90bf94093354629a6d003a5ea6f8c5f413f05a4dd092
@@ -1,6 +1,6 @@
1
1
  require 'metarecord/runner'
2
2
 
3
- Dir["config/metarecord.rb"].each do |file|
3
+ Dir["{config,app/config}/metarecord.rb"].each do |file|
4
4
  require "#{Dir.pwd}/#{file}"
5
5
  end
6
6
 
@@ -38,7 +38,7 @@ private
38
38
  end
39
39
 
40
40
  def make_renderer
41
- filepath = "lib/renderers/archive.cpp"
41
+ filepath = "app/autogen/renderers/archive.cpp"
42
42
  src = <<CPP
43
43
  #include <crails/renderers/archive_renderer.hpp>
44
44
  #include <crails/archive.hpp>
@@ -73,7 +73,7 @@ class CrailsDataGenerator < GeneratorBase
73
73
  _append "virtual void merge_data(Data) const;"
74
74
  _append "virtual std::string to_json() const;"
75
75
  _append "virtual bool is_valid();"
76
- _append "virtual void on_dependent_destroy(#{id_type});"
76
+ _append "virtual void on_dependent_destroy(Crails::Odb::Connection&, #{id_type});"
77
77
  _append ""
78
78
  end
79
79
 
@@ -278,6 +278,7 @@ CPP
278
278
  #{generate_includes}
279
279
  #{collect_includes_for(filename, true).join "\n"}
280
280
  namespace odb { class access; }
281
+ namespace Crails::Odb { class Connection; }
281
282
  #{data[:headers].join ""}
282
283
  namespace #{METARECORD_NAMESPACE}
283
284
  {
@@ -47,13 +47,13 @@ class CrailsDestroyGenerator < GeneratorBase
47
47
  def extension ; ".destroy.cpp" ; end
48
48
 
49
49
  def make_file filename, data
50
- include = "lib/" + filename[0...-2] + "hpp"
50
+ include = "app/autogen/" + filename[0...-2] + "hpp"
51
51
  source = "#include \"#{include}\"\n"
52
- source += "#include \"lib/#{filename[0...-2]}queries.hpp\"\n"
52
+ source += "#include \"app/autogen/#{filename[0...-2]}queries.hpp\"\n"
53
53
  source += "#include <crails/odb/helpers.hpp>\n"
54
54
  source += "#include <crails/odb/any.hpp>\n"
55
55
  source += "#include <#{GeneratorBase.odb_connection[:include]}>\n"
56
- source += "#include \"lib/odb/application-odb.hxx\"\n"
56
+ source += "#include \"app/autogen/odb/application-odb.hpp\"\n"
57
57
  source += (collect_includes_for filename).join "\n"
58
58
  source += "\n" + (data[:bodies].join "\n")
59
59
  end
@@ -64,13 +64,12 @@ class CrailsDestroyGenerator < GeneratorBase
64
64
  CrailsDestroyGenerator.my_prepare if CrailsDestroyGenerator.destroy_data.nil?
65
65
  @finalclass = object[:classname]
66
66
  @klassname = get_classname(object)
67
- _append "void #{@klassname}::on_dependent_destroy(#{id_type} self_id)"
67
+ _append "void #{@klassname}::on_dependent_destroy(Crails::Odb::Connection& database, #{id_type} self_id)"
68
68
  _append "{"
69
69
  unless object[:classname].nil?
70
70
  @indent += 1
71
71
  depended_by = CrailsDestroyGenerator.destroy_data[object[:classname]]
72
72
  if depended_by.class == Array
73
- _append "#{GeneratorBase.odb_connection[:object]} database;"
74
73
  depended_by.each do |relation|
75
74
  _append "// #{relation[:class]}"
76
75
  _append "{"
@@ -352,11 +352,11 @@ class CrailsEditGenerator < GeneratorBase
352
352
  source = "#include <crails/odb/helpers.hpp>\n"
353
353
  source += "#include <crails/odb/any.hpp>\n"
354
354
  source += "#include <#{GeneratorBase.odb_connection[:include]}>\n"
355
- source += "#include \"lib/odb/application-odb.hxx\"\n"
355
+ source += "#include \"app/autogen/odb/application-odb.hpp\"\n"
356
356
  end
357
357
 
358
358
  def make_file filename, data
359
- base = "lib/" + filename[0...-3]
359
+ base = "app/autogen/" + filename[0...-3]
360
360
  include = base + ".hpp"
361
361
  data[:bodies].each do |body|
362
362
  body.gsub! "${view-placeholder}", base.split("/")[0...-2].join("/")
@@ -72,7 +72,7 @@ CPP
72
72
  def extension ; ".queries.hpp" ; end
73
73
 
74
74
  def make_file filename, data
75
- base = "lib/" + filename[0...-3]
75
+ base = "app/autogen/" + filename[0...-3]
76
76
  include = base + ".hpp"
77
77
  file_define = "_#{filename[0...-3].upcase.gsub "/", "_"}_QUERIES_HPP"
78
78
  source = <<CPP
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: meta-record
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.16
4
+ version: 1.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Martin Moro
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-11-08 00:00:00.000000000 Z
10
+ date: 2026-11-09 00:00:00.000000000 Z
11
11
  dependencies: []
12
12
  description: |2
13
13
  MetaRecord is a code generator that allows you to define your application