Mercurial > pub > Impl
comparison Lib/IMPL/ORM/Schema.pm @ 31:d59526f6310e
Small fixes to Test framework (correct handlinf of the compilation errors in the test units)
Imported and refactored SQL DB schema from the old project
author | Sergey |
---|---|
date | Mon, 09 Nov 2009 01:39:16 +0300 |
parents | dd4d72600c69 |
children | d660fb38b7cc 4ff27cd051e3 |
comparison
equal
deleted
inserted
replaced
30:dd4d72600c69 | 31:d59526f6310e |
---|---|
12 | 12 |
13 BEGIN { | 13 BEGIN { |
14 public property mapValueTypes => prop_get | owner_set; | 14 public property mapValueTypes => prop_get | owner_set; |
15 public property mapReferenceTypes => prop_get | owner_set; | 15 public property mapReferenceTypes => prop_get | owner_set; |
16 public property mapPending => prop_get | owner_set; | 16 public property mapPending => prop_get | owner_set; |
17 public property prefix => prop_all; | 17 public property prefix => prop_get | owner_set; |
18 } | 18 } |
19 | 19 |
20 sub CTOR { | 20 sub CTOR { |
21 my ($this ) = @_; | 21 my ($this ) = @_; |
22 $this->mapValueTypes({}); | 22 $this->mapValueTypes({}); |
89 } | 89 } |
90 | 90 |
91 sub usePrefix { | 91 sub usePrefix { |
92 my ($this,$prefix) = @_; | 92 my ($this,$prefix) = @_; |
93 | 93 |
94 $prefix .= '::' if $prefix and $prefix !~ /::$/; | |
95 | |
94 (ref $this ? $this : $this->instance)->prefix($prefix); | 96 (ref $this ? $this : $this->instance)->prefix($prefix); |
97 } | |
98 | |
99 sub CompleteSchema { | |
100 my ($this) = @_; | |
101 | |
102 $this = ref $this ? $this : $this->instance; | |
103 | |
104 $this->mapReferenceTypes->{$_} = $_->ormGetSchema($this,delete $this->mapPending->{$_}) | |
105 foreach (keys %{$this->mapPending}); | |
95 } | 106 } |
96 | 107 |
97 1; | 108 1; |
98 | 109 |
99 __END__ | 110 __END__ |