This repository was archived by the owner on Jul 20, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +38
-30
lines changed
Expand file tree Collapse file tree 4 files changed +38
-30
lines changed Original file line number Diff line number Diff line change @@ -126,12 +126,10 @@ PrivateData = @{
126126 # IconUri = ''
127127
128128 # ReleaseNotes of this module
129- ReleaseNotes = ' Cross Platform support (Only SQL is supported xPlat. MDB and ESE are not)
130- * Removed Microsoft.Isam.Esent.Interop from RequiredAssemblies
131- * Load Microsoft.Isam.Esent.Interop when available
132- * removed RetrieveColumnAsGuid and moved properties to RetrieveColumnAsString as something broke on latest w10 insiders
129+ ReleaseNotes = ' EDB Fixes:
133130
134- * Fix ad-hoc mdb database access did not process as PreProc was missing MDB logic'
131+ * StatusReport move from Last to Previous. Issue: #43.
132+ * Registration and devices from from First to Next. Issue: #51'
135133
136134 } # End of PSData hashtable
137135
Original file line number Diff line number Diff line change @@ -40,23 +40,6 @@ function Get-DSCPullServerESERecord {
4040 [uint16 ] $Top
4141 )
4242 begin {
43- $stringColumns = @ (
44- ' TargetName' ,
45- ' ServerCheckSum' ,
46- ' TargetChecksum' ,
47- ' NodeName' ,
48- ' OperationType' ,
49- ' RefreshMode' ,
50- ' Status' ,
51- ' LCMVersion' ,
52- ' ReportFormatVersion' ,
53- ' ConfigurationVersion' ,
54- ' RebootRequested' ,
55- ' JobId' ,
56- ' Id' ,
57- ' ConfigurationID'
58- )
59-
6043 $boolColumns = @ (
6144 ' NodeCompliant' ,
6245 ' Dirty'
@@ -94,7 +77,10 @@ function Get-DSCPullServerESERecord {
9477 process {
9578 try {
9679 $recordCount = 0
97- while ([Microsoft.Isam.Esent.Interop.Api ]::TryMoveNext($Connection.SessionId , $Connection.TableId )) {
80+ $FirstMove = $true
81+
82+ while (Move-DSCPullServerESERecordPosition - Connection $Connection - Table $Table - FirstMove $FirstMove ) {
83+ $FirstMove = $false
9884 if ($PSBoundParameters.ContainsKey (' Top' ) -and $Top -eq $recordCount ) {
9985 break
10086 }
@@ -125,13 +111,6 @@ function Get-DSCPullServerESERecord {
125111 $_
126112 } catch {}
127113 }
128- } elseif ($column.Name -in $stringColumns ) {
129- $result ." $ ( $column.Name ) " = [Microsoft.Isam.Esent.Interop.Api ]::RetrieveColumnAsString(
130- $Connection.SessionId ,
131- $Connection.TableId ,
132- $column.Columnid ,
133- [System.Text.Encoding ]::Unicode
134- )
135114 } elseif ($column.Name -in $boolColumns ) {
136115 $result ." $ ( $column.Name ) " = [Microsoft.Isam.Esent.Interop.Api ]::RetrieveColumnAsBoolean(
137116 $Connection.SessionId ,
Original file line number Diff line number Diff line change 1+ function Move-DSCPullServerESERecordPosition {
2+ [OutputType ([bool ])]
3+ [CmdletBinding ()]
4+ param (
5+ [Parameter (Mandatory )]
6+ [DSCPullServerESEConnection ] $Connection ,
7+
8+ [Parameter (Mandatory )]
9+ [string ] $Table ,
10+
11+ [Parameter (Mandatory )]
12+ [bool ] $FirstMove
13+ )
14+
15+ switch ($Table ) {
16+ StatusReport {
17+ if ($FirstMove ) {
18+ [Microsoft.Isam.Esent.Interop.Api ]::TryMoveLast($Connection.SessionId , $Connection.TableId )
19+ } else {
20+ [Microsoft.Isam.Esent.Interop.Api ]::TryMovePrevious($Connection.SessionId , $Connection.TableId )
21+ }
22+ }
23+ default {
24+ if ($FirstMove ) {
25+ [Microsoft.Isam.Esent.Interop.Api ]::TryMoveFirst($Connection.SessionId , $Connection.TableId )
26+ } else {
27+ [Microsoft.Isam.Esent.Interop.Api ]::TryMoveNext($Connection.SessionId , $Connection.TableId )
28+ }
29+ }
30+ }
31+ }
You can’t perform that action at this time.
0 commit comments