Skip to content

Commit

Permalink
Refactor source modified date for multiple files
Browse files Browse the repository at this point in the history
Some types of components, such as tables, forms, reports, queries, and shared images may use multiple source files to represent a single database component. We may need to check all of the related source files to accurately determine the latest modification date.
  • Loading branch information
joyfullservice committed Dec 1, 2023
1 parent e3333a4 commit a767252
Show file tree
Hide file tree
Showing 31 changed files with 491 additions and 88 deletions.
16 changes: 14 additions & 2 deletions Version Control.accda.src/modules/IDbComponent.cls
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,18 @@ Public Function IsModified() As Boolean
End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceIsModified
' Author : Adam Waller
' Date : 12/1/2023
' Purpose : Returns true if the source file appears to be modified since the last
' : import or export. (When compared to the index)
'---------------------------------------------------------------------------------------
'
Public Function SourceIsModified(strFile As String) As Boolean
End Function


'---------------------------------------------------------------------------------------
' Procedure : DateModified
' Author : Adam Waller
Expand All @@ -138,7 +150,7 @@ End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceModified
' Procedure : SourceModifiedDateDate
' Author : Adam Waller
' Date : 4/27/2020
' Purpose : The date/time the source object was modified. In most cases, this would
Expand All @@ -147,7 +159,7 @@ End Function
' : allows either approach to be taken.
'---------------------------------------------------------------------------------------
'
Public Function SourceModified() As Date
Public Function SourceModifiedDate() As Date
End Function


Expand Down
19 changes: 16 additions & 3 deletions Version Control.accda.src/modules/clsAdpFunction.cls
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,19 @@ Public Function IDbComponent_IsModified() As Boolean
End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceIsModified
' Author : Adam Waller
' Date : 12/1/2023
' Purpose : Returns true if the source file appears to be modified since the last
' : import or export. (When compared to the index)
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean

End Function


'---------------------------------------------------------------------------------------
' Procedure : DateModified
' Author : Adam Waller
Expand All @@ -176,7 +189,7 @@ End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceModified
' Procedure : SourceModifiedDate
' Author : Adam Waller
' Date : 4/27/2020
' Purpose : The date/time the source object was modified. In most cases, this would
Expand All @@ -185,8 +198,8 @@ End Function
' : allows either approach to be taken.
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceModified() As Date
If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile)
Private Function IDbComponent_SourceModifiedDate() As Date
IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile)
End Function


Expand Down
19 changes: 16 additions & 3 deletions Version Control.accda.src/modules/clsAdpProcedure.cls
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,19 @@ Public Function IDbComponent_IsModified() As Boolean
End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceIsModified
' Author : Adam Waller
' Date : 12/1/2023
' Purpose : Returns true if the source file appears to be modified since the last
' : import or export. (When compared to the index)
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean

End Function


'---------------------------------------------------------------------------------------
' Procedure : DateModified
' Author : Adam Waller
Expand All @@ -176,7 +189,7 @@ End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceModified
' Procedure : SourceModifiedDate
' Author : Adam Waller
' Date : 4/27/2020
' Purpose : The date/time the source object was modified. In most cases, this would
Expand All @@ -185,8 +198,8 @@ End Function
' : allows either approach to be taken.
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceModified() As Date
If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile)
Private Function IDbComponent_SourceModifiedDate() As Date
IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile)
End Function


Expand Down
19 changes: 16 additions & 3 deletions Version Control.accda.src/modules/clsAdpServerView.cls
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,19 @@ Public Function IDbComponent_IsModified() As Boolean
End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceIsModified
' Author : Adam Waller
' Date : 12/1/2023
' Purpose : Returns true if the source file appears to be modified since the last
' : import or export. (When compared to the index)
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean

End Function


'---------------------------------------------------------------------------------------
' Procedure : DateModified
' Author : Adam Waller
Expand All @@ -176,7 +189,7 @@ End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceModified
' Procedure : SourceModifiedDate
' Author : Adam Waller
' Date : 4/27/2020
' Purpose : The date/time the source object was modified. In most cases, this would
Expand All @@ -185,8 +198,8 @@ End Function
' : allows either approach to be taken.
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceModified() As Date
If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile)
Private Function IDbComponent_SourceModifiedDate() As Date
IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile)
End Function


Expand Down
19 changes: 16 additions & 3 deletions Version Control.accda.src/modules/clsAdpTable.cls
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,19 @@ Public Function IDbComponent_IsModified() As Boolean
End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceIsModified
' Author : Adam Waller
' Date : 12/1/2023
' Purpose : Returns true if the source file appears to be modified since the last
' : import or export. (When compared to the index)
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean

End Function


'---------------------------------------------------------------------------------------
' Procedure : DateModified
' Author : Adam Waller
Expand All @@ -236,7 +249,7 @@ End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceModified
' Procedure : SourceModifiedDate
' Author : Adam Waller
' Date : 4/27/2020
' Purpose : The date/time the source object was modified. In most cases, this would
Expand All @@ -245,8 +258,8 @@ End Function
' : allows either approach to be taken.
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceModified() As Date
If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile)
Private Function IDbComponent_SourceModifiedDate() As Date
IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile)
End Function


Expand Down
19 changes: 16 additions & 3 deletions Version Control.accda.src/modules/clsAdpTrigger.cls
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,19 @@ Public Function IDbComponent_IsModified() As Boolean
End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceIsModified
' Author : Adam Waller
' Date : 12/1/2023
' Purpose : Returns true if the source file appears to be modified since the last
' : import or export. (When compared to the index)
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean

End Function


'---------------------------------------------------------------------------------------
' Procedure : DateModified
' Author : Adam Waller
Expand All @@ -202,7 +215,7 @@ End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceModified
' Procedure : SourceModifiedDate
' Author : Adam Waller
' Date : 4/27/2020
' Purpose : The date/time the source object was modified. In most cases, this would
Expand All @@ -211,8 +224,8 @@ End Function
' : allows either approach to be taken.
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceModified() As Date
If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile)
Private Function IDbComponent_SourceModifiedDate() As Date
IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile)
End Function


Expand Down
19 changes: 16 additions & 3 deletions Version Control.accda.src/modules/clsDbConnection.cls
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,19 @@ Public Function IDbComponent_IsModified() As Boolean
End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceIsModified
' Author : Adam Waller
' Date : 12/1/2023
' Purpose : Returns true if the source file appears to be modified since the last
' : import or export. (When compared to the index)
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean

End Function


'---------------------------------------------------------------------------------------
' Procedure : DateModified
' Author : Adam Waller
Expand All @@ -323,7 +336,7 @@ End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceModified
' Procedure : SourceModifiedDate
' Author : Adam Waller
' Date : 5/17/2021
' Purpose : The date/time the source object was modified. In most cases, this would
Expand All @@ -332,8 +345,8 @@ End Function
' : allows either approach to be taken.
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceModified() As Date
If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile)
Private Function IDbComponent_SourceModifiedDate() As Date
IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile)
End Function


Expand Down
19 changes: 16 additions & 3 deletions Version Control.accda.src/modules/clsDbDocument.cls
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,19 @@ Public Function IDbComponent_IsModified() As Boolean
End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceIsModified
' Author : Adam Waller
' Date : 12/1/2023
' Purpose : Returns true if the source file appears to be modified since the last
' : import or export. (When compared to the index)
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean

End Function


'---------------------------------------------------------------------------------------
' Procedure : DateModified
' Author : Adam Waller
Expand All @@ -411,7 +424,7 @@ End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceModified
' Procedure : SourceModifiedDate
' Author : Adam Waller
' Date : 4/27/2020
' Purpose : The date/time the source object was modified. In most cases, this would
Expand All @@ -420,8 +433,8 @@ End Function
' : allows either approach to be taken.
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceModified() As Date
If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile)
Private Function IDbComponent_SourceModifiedDate() As Date
IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile)
End Function


Expand Down
21 changes: 18 additions & 3 deletions Version Control.accda.src/modules/clsDbForm.cls
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,19 @@ Public Function IDbComponent_IsModified() As Boolean
End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceIsModified
' Author : Adam Waller
' Date : 12/1/2023
' Purpose : Returns true if the source file appears to be modified since the last
' : import or export. (When compared to the index)
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean

End Function


'---------------------------------------------------------------------------------------
' Procedure : DateModified
' Author : Adam Waller
Expand All @@ -237,7 +250,7 @@ End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceModified
' Procedure : SourceModifiedDate
' Author : Adam Waller
' Date : 4/27/2020
' Purpose : The date/time the source object was modified. In most cases, this would
Expand All @@ -246,8 +259,10 @@ End Function
' : allows either approach to be taken.
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceModified() As Date
If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile)
Private Function IDbComponent_SourceModifiedDate() As Date
IDbComponent_SourceModifiedDate = Largest( _
GetLastModifiedDate(IDbComponent_SourceFile), _
GetLastModifiedDate(SwapExtension(IDbComponent_SourceFile, "cls")))
End Function


Expand Down
19 changes: 16 additions & 3 deletions Version Control.accda.src/modules/clsDbHiddenAttribute.cls
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,19 @@ Public Function IDbComponent_IsModified() As Boolean
End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceIsModified
' Author : Adam Waller
' Date : 12/1/2023
' Purpose : Returns true if the source file appears to be modified since the last
' : import or export. (When compared to the index)
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceIsModified(strFile As String) As Boolean

End Function


'---------------------------------------------------------------------------------------
' Procedure : DateModified
' Author : Adam Waller / Indigo744
Expand All @@ -373,7 +386,7 @@ End Function


'---------------------------------------------------------------------------------------
' Procedure : SourceModified
' Procedure : SourceModifiedDate
' Author : Adam Waller / Indigo744
' Date : 4/27/2020
' Purpose : The date/time the source object was modified. In most cases, this would
Expand All @@ -382,8 +395,8 @@ End Function
' : allows either approach to be taken.
'---------------------------------------------------------------------------------------
'
Private Function IDbComponent_SourceModified() As Date
If FSO.FileExists(IDbComponent_SourceFile) Then IDbComponent_SourceModified = GetLastModifiedDate(IDbComponent_SourceFile)
Private Function IDbComponent_SourceModifiedDate() As Date
IDbComponent_SourceModifiedDate = GetLastModifiedDate(IDbComponent_SourceFile)
End Function


Expand Down
Loading

0 comments on commit a767252

Please sign in to comment.