Skip to content

Latest commit

 

History

History

transactions

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Transactions

This example demonstrates how to use transactions with libSQL.

Building

make

Running

./example

This example will:

  1. Create a new table called users.
  2. Start a transaction.
  3. Insert multiple users within the transaction.
  4. Demonstrate how to rollback a transaction.
  5. Start another transaction.
  6. Insert more users and commit the transaction.
  7. Query and display the final state of the users table.