Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Diff of /docs/trunk/oosqlite/en-US/oosqliteConnection.xml [r9141] .. [r9142] Maximize Restore

  Switch to side-by-side view

--- a/docs/trunk/oosqlite/en-US/oosqliteConnection.xml
+++ b/docs/trunk/oosqlite/en-US/oosqliteConnection.xml
@@ -119,6 +119,10 @@
 <row>
 <entry><link linkend="atrLastErrMsgClsConn">lastErrMsg</link></entry>
 <entry>Reflects a human readable explanation, a message, of the last error code recorded by the connection object.</entry>
+</row>
+<row>
+<entry><xref linkend="atrNullClsOOSQLiteConnection"/></entry>
+<entry>Reflects the default representation for the SQL NULL value that is returned by the interpreter, for this database connection, for database values that are NULL.</entry>
 </row>
 <row>
 <entry><link linkend="atrRecordFormatClsConn">recordFormat</link></entry>
@@ -743,6 +747,99 @@
 </variablelist>
 </section>  <!-- End ooSQLiteConnection::lastErrMsg() [attribute]  -->
 
+<section id="atrNullClsOOSQLiteConnection" xreflabel="null"><title>null (Attribute)</title>
+<indexterm><primary>null</primary></indexterm>
+<indexterm><primary>ooSQLiteConnection class</primary><secondary>null</secondary></indexterm>
+<programlisting>
+<![CDATA[
+>>--null-----------------------------------------><
+
+>>--null = nullObj-------------------------------><
+
+]]>
+</programlisting>
+
+<para>
+  Reflects the default representation for the SQL NULL value that is returned by the interpreter, for this database
+  connection, for database values that are NULL.
+</para>
+<variablelist>
+  <varlistentry><term><emphasis role="bold">null get:</emphasis></term>
+  <listitem>
+  <para>
+    Returns the current object the interpreter uses for this database connection for the SQL NULL value. If the programmer
+    has not changed this attribute, its value is the value of the <xref linkend="atrNullClsOOSQLite"/> attribute of the
+    <computeroutput>ooSQLite</computeroutput> class. Normally this is the <computeroutput>.nil</computeroutput> object.
+  </para>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">null set:</emphasis></term>
+  <listitem>
+  <para>
+    Set this attribute to either the <computeroutput>.nil</computeroutput> object, or some alternative <emphasis
+    role="italic">string</emphasis> value.
+  </para>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">Remarks:</emphasis></term>
+  <listitem>
+  <para>
+    By default, ooSQLite uses the <computeroutput>.nil</computeroutput> object to represent the SQL NULL value. Queries for
+    values stored in the database will return the <computeroutput>.nil</computeroutput> object for any value that is SQL
+    NULL. However, by changing the value of the <emphasis role="italic">null</emphasis> attribute, the Rexx programmer can
+    change the value the interpreter returns for NULL for any statement executed through this database connection. Typically
+    this would be done when the returned values are going to be displayed as text and the programmer would prefer to work
+    with a string directly. Perhaps the value <emphasis role="italic">NULL</emphasis>, or <emphasis role="italic">no
+    value</emphasis> would be assigned.
+  </para>
+  <para>
+    When a <computeroutput>ooSQLiteConnection</computeroutput> object is instantiated, the <emphasis
+    role="italic">null</emphasis> attribute is assigned the value of the <xref linkend="atrNullClsOOSQLite"/> attribute of
+    the <computeroutput>ooSQLiteConnection</computeroutput>.
+  </para>
+  <para>
+    <emphasis role="bold">Note</emphasis> that this attribute does not affect the value the programmer must use to assign a
+    SQL NULL to the database. The programmer must use the <computeroutput>.nil</computeroutput> object for that.
+  </para>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">Details</emphasis></term>
+  <listitem>
+  <para>
+    Raises syntax errors when incorrect usage is detected.
+  </para>
+  <para>
+    This attribute is provided by ooSQLite, there is no similar feature provided by SQLite.
+  </para>
+  </listitem></varlistentry>
+  <varlistentry><term><emphasis role="bold">Example:</emphasis></term>
+  <listitem>
+  <para>
+    This example sets the <emphasis role="italic">null</emphasis> attribute of the database connection to <emphasis
+    role="italic">NULL</emphasis>. This allows the application to invoke the <emphasis role="italic">left</emphasis>
+    method on the returned value without having to check that the return is the <computeroutput>.nil</computeroutput> object.
+    Note that invoking the <emphasis role="italic">left</emphasis> method on the <computeroutput>.nil</computeroutput> object
+    will raise a syntax condition:
+<programlisting>
+<![CDATA[
+
+  dbConn = .ooSQLiteConnection~new(dbName, .ooSQLite~OPEN_READWRITE)
+  dbConn~null = 'NULL'
+
+  sql = 'SELECT * FROM foods ORDER BY name;'
+  stmt = .ooSQLiteStmt~new(dbConn, sql)
+
+  say stmt~columnName(1)~left(25) || stmt~columnName(2)~left(25) || stmt~columnName(3)~left(25)
+  say '='~copies(80)
+
+  do while stmt~step == stmt~ROW
+    say stmt~columnText(1)~left(25) || stmt~columnText(2)~left(25) || stmt~columnText(3)~left(25)
+  end
+
+]]>
+</programlisting>
+  </para>
+  </listitem></varlistentry>
+</variablelist>
+</section>  <!-- End ooSQLiteConnection::nullObj() [attribute]  -->
+
 <section id="atrRecordFormatClsConn"><title>recordFormat (Attribute)</title>
 <indexterm><primary>recordFormat</primary></indexterm>
 <indexterm><primary>ooSQLiteConnection class</primary><secondary>recordFormat</secondary></indexterm>
@@ -2794,6 +2891,7 @@
           <member>compile_options          </member>
           <member>database_list            </member>
           <member>encoding                 </member>
+          <memberforeign_key_check         </member>
           <member>foreign_key_list         </member>
           <member>foreign_keys             </member>
           <member>freelist_count           </member>
@@ -2915,6 +3013,15 @@
             UTF-16 encoding). If the main database has not already been created, then the value returned is the text encoding
             that will be used to create the main database, if it is created by this session. Consult the SQLite <ulink
             url="http://www.sqlite.org/pragma.html#pragma_encoding">encoding</ulink> documentation for complete details.
+          </para>
+          </listitem></varlistentry>
+          <varlistentry><term>foreign_key_check</term>
+          <listitem>
+          <para>
+            Checks the database, or the table specified, for foreign key constraints that are violated and returns one row of
+            output for each violation. Consult the SQLite <ulink
+            url="http://www.sqlite.org/pragma.html#pragma_foreign_key_check">foreign_key_check</ulink> documentation for
+            complete details.
           </para>
           </listitem></varlistentry>
           <varlistentry><term>foreign_key_list</term>