Changes between Version 37 and Version 38 of Packages/SQLite


Ignore:
Timestamp:
07/02/12 05:58:54 (12 years ago)
Author:
C Rempel
Comment:

/* Testing Ideas */

Legend:

Unmodified
Added
Removed
Modified
  • Packages/SQLite

    v37 v38  
    9999=  Testing Ideas  =
    100100
    101 Originally I thought it would be necessary to define a src/os_rtems.c because of issues with shared memory support, and thus would need to use the network filesystem, but as that is no longer an issue, I would suggest using one of the network-demos with a filesystem as a code-base to copy and the [http://www.sqlite.org/quickstart.html SQLite quickstart] guide as guideline for the database demo.
     101# Link the SQLite library using a Makefile.
     102# Use [http://www.sqlite.org/cintro.html An Introduction To The SQLite C/C++ Interface] as a guideline for the test.
     103So the idea would be to:
     104# Open the database
     105# Prepare the SQL statement for processing
     106# "Step" through the results, in this case, an insert (or make table?) would be awesome!
     107# Some simple column statement
     108# Finalize (delete) the prepared statement
     109# Close the connection.
     110So, a test would look like:
     111 /* SQL Test */
     112/* Database initialization */
     113 printk("Opening the Database\n");
     114 sqlite3_open(filename, &ppDb, flags, &zVfs);
     115 
     116 printk("Preparing the SQL Statement\n");
     117 sqlite3_prepare_v2(&db, &zSql, nByte, &ppStmt, &pzTail);
     118
     119 printk("Stepping through the Results\n");
     120 sqlite3_step(&ppStmt);
     121
     122 printk("Counting the number of columns...");
     123 nCols = sqlite3_column_count(&ppStmt);
     124 printk("and the number of columns is %d\n", nCols);
     125
     126 printk("Deleting the SQL Statement\n");
     127 sqlite3_finalize(&ppStmt);
     128 
     129 printk("Closing the Database");
     130 sqlite3_close(&ppDb);
    102131=  Next Steps  =
    103132