Database

This section will demonstrate how to connect to popular databases from Zig.

Data model used is as follows:

  1. Create two tables: cat_colors, cats, cats has a reference in cat_colors.
  2. Create a prepare statement for each table, and insert data.
  3. Execute a join query to get cat_name and color_name at the same time.

cat_colors

idname
1Blue
2Black

cats

idnamecolor_id
1Tigger1
2Sammy1
3Oreo2
4Biscuit2
Last change: 2024-07-04, commit: e577a80