fix: Fix all examples

This commit is contained in:
Mahmoud Emad
2025-05-17 16:03:00 +03:00
parent 57f59da43e
commit e4c50ca9d7
19 changed files with 166 additions and 80 deletions

View File

@@ -1,8 +1,8 @@
// Get the database instance
let db = get_db();
// Create a new calendar
let calendar = calendar__builder(1);
// Create a new calendar with auto-generated ID (pass 0 for auto-generated ID)
let calendar = calendar__builder(0);
calendar.name = "My First Calendar";
set_description(calendar, "A calendar for testing Rhai integration");
@@ -26,8 +26,8 @@ if calendar_exists(db, 1) {
print("Failed to retrieve calendar with ID 1");
}
// Create another calendar
let calendar2 = calendar__builder(2);
// Create another calendar with auto-generated ID
let calendar2 = calendar__builder(0);
calendar2.name = "My Second Calendar";
set_description(calendar2, "Another calendar for testing");