C++ Embedded SQL Samples

The C++ embedded SQL samples use the McoSqlEngine and related classes to encapsulate the native C functions demonstrated in the C API embedded SQL samples. By default, all sample executables are built in the eXtremeDB/target/bin directory so, after building the sample(s), it is convenient to cd to target/bin to run the sample or, as recommended, step through the code in the development system debugger.

Please use the links below to view the description and specific instructions for individual samples in the following subdirectories:

\native\sql\api\sql-02-open\allocator
Demonstrates the use of class StdAllocator to register a custom dynamic memory allocator for SQL statement execution.
\native\sql\api\sql-02-open\imp_csv
Populates an all-in-memory database from an external CSV file.
\native\sql\api\sql-02-open\initialize
Demonstrates basic application initialization for C++ SQL Access.
\native\sql\api\sql-02-open\raid
Opens and initializes a RAID database.
\native\sql\api\sql-02-open\shutdown
Demonstrates shutting down the McoSqlEngine.
\native\sql\api\sql-03-transactions\mursiw
Demonstrates SQL operations using the MURSIW Transaction Manager.
\native\sql\api\sql-03-transactions\mursiw2
Demonstrates SQL operations using the MURSIW Transaction Manager with two database instances.
\native\sql\api\sql-03-transactions\mvcc
Demonstrates SQL operations using the MVCC Transaction Manager.
\native\sql\api\sql-03-transactions\persistent
Demonstrates SQL operations using a persistent database.
\native\sql\api\sql-03-transactions\ph2commit
Demonstrates a two-phase database transaction.
\native\sql\api\sql-03-transactions\vtable
Demonstrates the use of virtual tables in combination with an eXtremeDB database.
\native\sql\api\sql-04-varlength\blobs
Demonstrates the use of the blob (Binary Large Object) data type.
\native\sql\api\sql-04-varlength\vectors
Demonstrates the use of the vector data type.
\native\sql\api\sql-05-structures
Demonstrates the use of class fields of type struct.
\native\sql\api\sql-06-references
Demonstrates the implementation of joins using autoid references.
\native\sql\api\sql-07-search\btree
Demonstrates searches with a Btree index.
\native\sql\api\sql-07-search\cursor
Demonstrates cursor operations with a Btree index.
\native\sql\api\sql-07-search\hash
Demonstrates SQL select statements on unique and non-unique hash indexes.
\native\sql\api\sql-07-search\patricia
Demonstrates cursor operations with a Patricia index.
\native\sql\api\sql-07-search\rtree
Demonstrates spatial searches with an Rtree index.
\native\sql\api\sql-08-join
Performs joins through varied select statements.
\native\sql\api\sql-09-functions\group-by
Demonstrates the use of the group by clause.
\native\sql\api\sql-09-functions\math
Demonstrates use of the SQL math functions.
\native\sql\api\sql-10-rsql\client
Demonstrates the client-side implementation of a client-server application.
\native\sql\api\sql-10-rsql\server
Demonstrates the server-side implementation of a client-server application.
\native\sql\api\sql-11-sequences
Demonstrates the use of the sequence data type.
\native\sql\api\sql-12-interactive
Demonstrates how to create an interactive SQL utility using the DistributedSqlEngine class.
\native\sql\api\sql-13-aggregator
Demonstrates how to use an SqlAggregator to manage database shards in a local process.
cluster_ddl
Demonstrates the use of DDL statements in a cluster environment using the SQL API (included in eXtremeDB Cluster packages with eXtremeSQL).
cluster_sql
Demonstrates the use of the SQL C++ API in a cluster.
\native\sql\hasql_cpp\master
Demonstrates the master-side implementation of HA using the SQL API.
\native\sql\hasql_cpp\replica
Demonstrates the replica-side implementation of HA using the SQL API.
\odbc\samples\simpleodbc
Demonstrates the use of standard ODBC functions in conjunction with the eXtremeSQL ODBC driver to connect to the in-memory database.
\native\sql\tpc
Demonstrates an implementation of the Transaction Processing Performance Council Benchmark B.
\native\sql\tpc_log
Demonstrates an implementation of the Transaction Processing Performance Council Benchmark B using eXtremeDB Transaction Logging.