📄 suncms.dm1.svn-base
字号:
105,OraInsTrigLib,0,0,0
106,"",1,0,0
107,OraUpdtTrigger,0,0,0
108,"",1,0,0
109,OraDelTrigger,0,0,0
110,"",1,0,0
111,OraInsTrigger,0,0,0
112,"",1,0,0
113,Org_Struc,0,0,0
114,Org_Struct,0,0,0
115,User,0,0,0
116,Role,0,0,0
117,Group,0,0,0
118,User_Org,0,0,0
119,User_Role,0,0,0
120,User_Group,0,0,0
121,sunCMS,0,0,0
122,CMS_User,0,0,0
123,CMS_Role,0,0,0
124,CMS_Group,0,0,0
125,T_Org_Struct,0,0,0
126,T_Users,0,0,0
127,T_Roles,0,0,0
128,T_Groups,0,0,0
129,T_User_Org,0,0,0
130,T_User_Role,0,0,0
131,T_User_Group,0,0,0
132,Active,0,0,0
133,状态,0,0,0
134,User_Status,0,0,0
135,新闻,0,0,0
136,新闻ID,0,0,0
137,T_Article,0,0,0
138,栏目ID,0,0,0
139,Artclass_ID,0,0,0
140,栏目名称,0,0,0
141,Artclass_Name,0,0,0
142,新闻标题,0,0,0
143,Article_Title,0,0,0
144,新闻摘要,0,0,0
145,Article_Desc,0,0,0
146,DTX,0,0,0
147,新闻内容,0,0,0
148,Article_Content,0,0,0
149,新闻状态,0,0,0
150,Article_Status,0,0,0
151,D,0,0,0
152,期限,0,0,0
153,Article_Overdue,0,0,0
154,作者ID,0,0,0
155,Article_Author_ID,0,0,0
156,审核ID,0,0,0
157,Article_Editor_ID,0,0,0
158,NUM,0,0,0
159,阅读次数,0,0,0
160,Article_Read_Count,0,0,0
161,附件,0,0,0
162,Article_Attach,0,0,0
163,DT,0,0,0
164,Modify_By,0,0,0
165,Modify_Time,0,0,0
166,作者,0,0,0
167,Article_Author_Name,0,0,0
168,审核人,0,0,0
169,Article_Editor_Name,0,0,0
170,PK9,0,0,0
171,新闻频道,0,0,0
172,频道ID,0,0,0
173,频道名称,0,0,0
174,是否审核,0,0,0
175,是否有效,0,0,0
176,Article_Class,0,0,0
177,CLASS_NAME,0,0,0
178,IF_CHECK,0,0,0
179,IF_VALIBE,0,0,0
180,IF_VALID,0,0,0
181,i,0,0,0
182,PK10,0,0,0
183,父频道,0,0,0
184,PAR_CLASS_ID,0,0,0
185,父频道名称,0,0,0
186,PAR_CLASS_NAME,0,0,0
187,kk,0,0,0
188,权限,0,0,0
189,编辑,0,0,0
190,审核,0,0,0
191,发布,0,0,0
192,AUTHORITY,0,0,0
193,ROLE_ID,0,0,0
194,CLASS_ID,0,0,0
195,IF_EDIT,0,0,0
196,IF_PUBLISH,0,0,0
197,PK11,0,0,0
198,R,0,0,0
LargeString
String_Id,Data,Row_Time_Stamp
102,"
Function OraDefParUpdtSN( Rel As Relationship ) As String
Dim Result As String
Dim FKColumn As FKColumnPair
ParentCount% = 0
ChildCount% = 0
For Each FKColumn In Rel.FKColumnPairs
If FKColumn.ParentAttribute.Hidden = False Then ParentCount = ParentCount + 1
If FKColumn.ChildAttribute.Hidden = False Then ChildCount = ChildCount + 1
if ParentCount <> ChildCount Then Exit Function
Next FKColumn
Result = ""-- Parent Update: SET NULL"" & vbCrLf
Result = Result & "" UPDATE "" & Rel.ChildEntity.TableName & "" SET"" & vbCrLf
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & "" "" & FKColumn.ChildAttribute.ColumnName & "" = NULL""
If Count < Rel.FKColumnPairs.Count Then Result = Result & "",""
Result = Result & vbCrLf
Next FKColumn
Result = Result & "" WHERE"" & vbCrLf
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & "" "" & FKColumn.ChildAttribute.ColumnName
Result = Result & "" = :OLD."" & FKColumn.ParentAttribute.ColumnName
If Count < Rel.FKColumnPairs.Count Then
Result = Result & "" AND""
Else
Result = Result & "";""
End If
Result = Result & vbCrLf
Next FKColumn
OraDefParUpdtSN = Result
End Function
Function OraDefParUpdtRstr( Rel As Relationship, TriggerName As String ) As String
Dim Result As String
Dim FKColumn As FKColumnPair
ParentCount% = 0
ChildCount% = 0
For Each FKColumn In Rel.FKColumnPairs
If FKColumn.ParentAttribute.Hidden = False Then ParentCount = ParentCount + 1
If FKColumn.ChildAttribute.Hidden = False Then ChildCount = ChildCount + 1
if ParentCount <> ChildCount Then Exit Function
Next FKColumn
Result = ""-- Parent Update: RESTRICT"" & vbCrLf
Result = Result & "" IF (""
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & ""UPDATING('"" & FKColumn.ParentAttribute.ColumnName & ""')""
If Count < Rel.FKColumnPairs.Count Then
Result = Result & "" OR"" & vbCrLf & "" ""
Else
Result = Result & "") THEN"" & vbCrLf & "" BEGIN"" & vbCrLf
End If
Next FKColumn
Result = Result & "" SELECT COUNT(*) INTO RowCount"" & vbCrLf
Result = Result & "" FROM "" & Rel.ChildEntity.TableName & "" ch"" & vbCrLf
Result = Result & "" WHERE ""
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & ""ch."" & FKColumn.ChildAttribute.ColumnName
Result = Result & "" = :OLD."" & FKColumn.ParentAttribute.ColumnName
If Count% < Rel.FKColumnPairs.Count Then
Result = Result & "" AND"" & vbCrLf & "" ""
Else
Result = Result & "";"" & vbCrLf
End If
Next FKColumn
Result = Result & "" IF (RowCount > 0) THEN"" & vbCrLf
Result = Result & "" BEGIN"" & vbCrLf & "" RAISE_APPLICATION_ERROR(-20011, '""
Result = Result & TriggerName & "": ""
Result = Result & ""Cannot update because foreign keys still exist in ""
Result = Result & Rel.ChildEntity.TableName & ""');"" & vbCrLf
Result = Result & "" END;"" & vbCrLf
Result = Result & "" END IF;"" & vbCrLf
Result = Result & "" END;"" & vbCrLf & "" END IF;""
OraDefParUpdtRstr = Result
End Function
Function OraDefParUpdtCasc( Rel As Relationship ) As String
Dim Result As String
Dim FKColumn As FKColumnPair
ParentCount% = 0
ChildCount% = 0
For Each FKColumn In Rel.FKColumnPairs
If FKColumn.ParentAttribute.Hidden = False Then ParentCount = ParentCount + 1
If FKColumn.ChildAttribute.Hidden = False Then ChildCount = ChildCount + 1
if ParentCount <> ChildCount Then Exit Function
Next FKColumn
Result = ""-- Parent Update: CASCADE"" & vbCrLf
Result = Result & "" UPDATE "" & Rel.ChildEntity.TableName & "" SET"" & vbCrLf
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & "" "" & FKColumn.ChildAttribute.ColumnName & "" = :NEW.""
Result = Result & FKColumn.ParentAttribute.ColumnName
If Count < Rel.FKColumnPairs.Count Then Result = Result & "",""
Result = Result & vbCrLf
Next FKColumn
Result = Result & "" WHERE"" & vbCrLf
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & "" "" & FKColumn.ChildAttribute.ColumnName
Result = Result & "" = :OLD."" & FKColumn.ParentAttribute.ColumnName
If Count < Rel.FKColumnPairs.Count Then
Result = Result & "" AND""
Else
Result = Result & "";""
End If
Result = Result & vbCrLf
Next FKColumn
OraDefParUpdtCasc = Result
End Function
Function OraDefChUpdtRstr( Rel As Relationship, TriggerName As String ) As String
Dim Result As String
Dim FKColumn As FKColumnPair
ParentCount% = 0
ChildCount% = 0
For Each FKColumn In Rel.FKColumnPairs
If FKColumn.ParentAttribute.Hidden = False Then ParentCount = ParentCount + 1
If FKColumn.ChildAttribute.Hidden = False Then ChildCount = ChildCount + 1
if ParentCount <> ChildCount Then Exit Function
Next FKColumn
Result = ""-- Child Update: RESTRICT"" & vbCrLf
Result = Result & "" IF (""
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & ""UPDATING('"" & FKColumn.ChildAttribute.ColumnName & ""')""
If Count < Rel.FKColumnPairs.Count Then
Result = Result & "" OR"" & vbCrLf & "" ""
Else
Result = Result & "") THEN"" & vbCrLf & "" BEGIN"" & vbCrLf
End If
Next FKColumn
Result = Result & "" SELECT COUNT(*) INTO RowCount"" & vbCrLf
Result = Result & "" FROM "" & Rel.ParentEntity.TableName & "" pr"" & vbCrLf
Result = Result & "" WHERE ""
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
Result = Result & ""pr."" & FKColumn.ParentAttribute.ColumnName
Result = Result & "" = :NEW."" & FKColumn.ChildAttribute.ColumnName
If Count% < Rel.FKColumnPairs.Count Then
Result = Result & "" AND"" & vbCrLf & "" ""
Else
Result = Result & "";"" & vbCrLf
End If
Next FKColumn
If Rel.Mandatory Then
Result = Result & "" IF (RowCount < 1) THEN"" & vbCrLf
Else
Result = Result & "" IF (RowCount < 1 AND"" & vbCrLf
Count% = 0
For Each FKColumn In Rel.FKColumnPairs
Count% = Count% + 1
If Count% = 1 Then
Result = Result & "" (""
Else
Result = Result & "" ""
End If
Result = Result & "":NEW."" & FKColumn.ChildAttribute.ColumnName
Result = Result & "" IS NOT NULL""
If Count% < Rel.FKColumnPairs.Count Then
Result = Result & "" OR"" & vbCrLf
Else
Result = Result & ""))"" & vbCrLf & "" THEN"" & vbCrLf
End If
Next FKColumn
End If
Result = Result & "" BEGIN"" & vbCrLf & "" RAISE_APPLICATION_ERROR(-20012, '""
Result = Result & TriggerName & "": ""
Result = Result & ""Cannot update because primary key value not found in ""
Result = Result & Rel.ParentEntity.TableName & ""');"" & vbCrLf
Result = Result & "" END;"" & vbCrLf
Result = Result & "" END IF;"" & vbCrLf
Result = Result & "" END;"" & vbCrLf & "" END IF;""
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -