-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.sh
More file actions
21 lines (15 loc) · 710 Bytes
/
Copy pathtest.sh
File metadata and controls
21 lines (15 loc) · 710 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
# Source the storage engine script
source "storage-engine.sh"
# Test the functions
collection="users"
record_id1=$(create_record "$collection" "John Doe" "string")
record_id2=$(create_record "$collection" "25" "integer")
record_id3=$(create_record "$collection" "true" "boolean")
record_id4=$(create_record "$collection" "[email protected]" "email")
echo "Created records with IDs: $record_id1, $record_id2, $record_id3, $record_id4"
read_record "$collection" "$record_id1"
update_record "$collection" "$record_id1" "John Doe Updated" "string"
delete_record "$collection" "$record_id2"
record_file=$(search_index "$collection" "$record_id3")
echo "Record file for ID $record_id3: $record_file"