Skip to content

Instantly share code, notes, and snippets.

@coramuirgen
Last active July 5, 2016 09:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coramuirgen/7ac395ca60679cbb87495cfd219c25db to your computer and use it in GitHub Desktop.
Save coramuirgen/7ac395ca60679cbb87495cfd219c25db to your computer and use it in GitHub Desktop.
called by prepareinput
Public Function PrepareEmpty(inputrecords As QueryableRecords, storagemode As StorageModes) As QueryableRecords
If storagemode = StorageModes.DirectModel Then
Set inputrecords = ModelRecords.CreateEmpty
ElseIf Var.Make(storagemode).OneOf(StorageModes.VirtualRecordset, StorageModes.XMLFileStream) Then
Set inputrecords = AdoRecords.CreateEmpty
End If
Set PrepareEmpty = inputrecords
End Function
Public Function Append(torecords As QueryableRecords, inputheadertype As RecordsHeaderType, inputdata As Var) As QueryableRecords
Dim inputparsingprocedure As String
inputparsingprocedure = Str.Join(THISCLASS & ".From", RecordsInputTypeName(RecordsInputType(inputdata))).Show
Dim element As Variant
For Each element In inputdata.Value
Set torecords = RunProcedure(inputparsingprocedure, element, inputheadertype, torecords)
Next
Set Append = torecords
End Function
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment