summaryrefslogtreecommitdiff
path: root/docs/html/xbc15.html
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2023-03-11 18:15:37 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2023-03-11 18:15:37 +0100
commitdd70ff8bf32c2d7ed365004b1770058265db1978 (patch)
tree084788d142d86c4dc38f5c48606523b4040596e6 /docs/html/xbc15.html
parent517ad9d4b6eae320b708d03a9340a22893b0cab7 (diff)
New upstream version 4.1.0upstream/4.1.0
Diffstat (limited to 'docs/html/xbc15.html')
-rwxr-xr-xdocs/html/xbc15.html127
1 files changed, 86 insertions, 41 deletions
diff --git a/docs/html/xbc15.html b/docs/html/xbc15.html
index 136724d..fde33b8 100755
--- a/docs/html/xbc15.html
+++ b/docs/html/xbc15.html
@@ -1,51 +1,96 @@
+
<!DOCTYPE HTML PUBLIC>
<HTML>
<TITLE>Xbase DBMS Chapter 15</TITLE>
<BODY BGCOLOR=#FFFFFF>
-<H2><p align="center">Class Inventory</p></H2>
-<p align="center">Chapter Updated 12/24/22</p><hr>
-<br>
-<center><h3>Class Descriptions</h3></center>
-
-<center>
-<table border=1>
-<tr><th>Class</th><th>Description</th></tr>
-<tr><td>xbBcd</td><td>Supports binary coded deciemal data</td></tr>
-<tr><td>xbDate</td><td>Support date operations on a given date formatted as YYYYMMDD</td></tr>
-<tr><td>xbDbf</td><td>Base class for DBF file handling. If you are adding support for a new file type, <br>derive new file type class from this.</td></tr>
-<tr><td>xbDbf3</td><td>Derived from xbDbf, supports DBase V3 files</td></tr>
-<tr><td>xbDbf4</td><td>Derived from xbDbf, supports DBase V4 files</td></tr>
-<tr><td>xbExp</td><td>Class for supporting expression logic</td></tr>
-<tr><td>xbExpNode</td><td>Class definition of a single node, utilized by xbExp</td></tr>
-<tr><td>xbFile</td><td>Main file class. If you are porting this library to another platform, start here</td></tr>
-<tr><td>xbFilter</td><td>Supports filters</td></tr>
-<tr><td>xbIx</td><td>Base class for index file support. If you are adding support for a new index type, <br>derive new index type class from this.</td></tr>
-<tr><td>xbIxNdx</td><td>Derived from xbIx, supports NDX style indices.</td></tr>
-<tr><td>xbIxMdx</td><td>Derived from xbIx, supports MDX style indices</td></tr>
-<tr><td>xbLinkList</td><td>Class supporting linked list functionality</td></tr>
-<tr><td>xbLinkListOrd</td><td>Class supporting ordered linked list functionality</td></tr>
-<tr><td>xbLinkListNode</td><td>Class defining one node, used by xbLinkList and xbLinkListOrd</td></tr>
-<tr><td>xbLog</td><td>Class supporting general log file activity</td></tr>
-<tr><td>xbMemo</td><td>Base class for supporting memo (.DBT) files. If you are adding support for a new memo type, <br>derive new memo type class from this.</td></tr>
-<tr><td>xbMemoDbt3</td><td>Derived from xbMemo, supports V3 Memo files</td></tr>
-<tr><td>xbMemoDbt4</td><td>Derived from xbMemo, supports V3 Memo files</td></tr>
-<tr><td>xbSql</td><td>Supports SQL access</td></tr>
-<tr><td>xbSsv</td><td>Base class, shared system values</td></tr>
-<tr><td>xbString</td><td>String handling class</td></tr>
-<tr><td>xbTag</td><td>Class to support index tags</td></tr>
-<tr><td>xbTblMgr</td><td>Class used internally in the library for managing multiple open files/tables</td></tr>
-<tr><td>xbUda</td><td>Class for supporting fields for the xbSql functions. Stands for User data area</td></tr>
-<tr><td>xbXBase</td><td>Class to tie everything together. Every application program starts with one of these</td></tr>
-</table>
-</center>
+<H2><p align="center">Block Read Functionality</p></H2>
+<p align="center">Chapter Updated 2/1/23</p><hr>
-<hr>
-<br><br>
-Fix me...
-<p><img src="Xbase64ClassDiagram.jpg"><br>
+<h3>Block Reads</h3>
+
+As of release 4.1.1, the Xbase library includes functionality for reading a DBF file in blocks, rather than one record at a time.<br><br>
+
+This functionality can be used to improve application performance in situations where a data file is being read sequentially.
+For situations where records are retrieved randomly from the file, enabling this probably won't help much. In short, this
+can be turned on when accessing a file sequentially and should be left off when not processing sequentially.<br><br>
+
+The logic is all handled internally within the library, all that is needed is to enable it and the library handles the rest.<br><br>
+
+<h3>One Caveat</h3>
+This functionality was originally designed with reporting in mind and doesn't currently have any auto locking associated with it.
<br><br>
+
+
+<h3>Sample Code</h3>
+See example code below for how to enable and disable the feature.
+
+
+<hr>
+
+#include "xbase.h"<br>
+using namespace xb;<br>
+<br>
+int main(int ac,char** av)<br>
+{<br>
+ xbXBase x;<br>
+ xbInt16 iRc;<br>
+ x.EnableMsgLogging();<br>
+ x.SetLogSize( 1000000L );<br>
+<br>
+ if (ac <= 1) {<br>
+ std::cout << "Usage: xb_dumprecs filename..." << std::endl;<br>
+ return 1;<br>
+ }<br>
+<br>
+ xbDbf *MyFile = NULL;<br>
+ if(( iRc = x.OpenHighestVersion( av[1], "", &MyFile )) != XB_NO_ERROR ){<br>
+ std::cout << "Could not open file iRc = " << iRc << " file = " << av[1] << std::endl;<br>
+ x.DisplayError( iRc );<br>
+ return 0;<br>
+ }<br>
+<br>
+// std::cout << "Processing file sequentially from beginning..." << std::endl;<br>
+<br>
+<br>
+<b>
+ // turn on Block Read Processing<br>
+ #ifdef XB_BLOCKREAD_SUPPORT<br>
+ MyFile->EnableBlockReadProcessing();<br>
+ #endif<br>
+</b>
+<br>
+ xbUInt32 j = 0;<br>
+ xbUInt32 ulRecCnt = 0;<br>
+<br>
+ iRc = MyFile->GetRecordCnt( ulRecCnt );<br>
+<br>
+ if( iRc < XB_NO_ERROR )<br>
+ return iRc;<br>
+ while( j < ulRecCnt ){<br>
+ if( j == 0 )<br>
+ iRc = MyFile->DumpRecord(++j, 2, 2 );<br>
+ else<br>
+ iRc = MyFile->DumpRecord(++j, 2, 1 );<br>
+ if( iRc != XB_NO_ERROR ){<br>
+ x.DisplayError( iRc );<br>
+ return 1;<br>
+ }<br>
+ }<br>
+ std::cout << j << " Records processed." << std::endl;<br>
+<br>
+<br><b>
+ // optionally turn off Block Read Processing<br>
+ #ifdef XB_BLOCKREAD_SUPPORT<br>
+ MyFile->DisableBlockReadProcessing();<br>
+ #endif<br></b>
+<br>
+ MyFile->Close();<br>
+ return 0;<br>
+}<br>
+<br>
+
<hr>
-<p><img src="xbase.jpg"><br><hr>
+<p><img src="xbase.jpg"><hr>
</BODY>
</HTML>