Skip to content

Commit 39daa1a

Browse files
authored
fix: helix init default schema and queries (#427)
## Description - Remove Label field names since label is in RESERVED_FIELD_NAMES - Change the Integer type to the appropriate int type definition - Change user_id to ID ## Related Issues ### None Closes # ## Checklist when merging to main - [x] No compiler warnings (if applicable) - [x] Code is formatted with `rustfmt` - [x] No useless or dead code (if applicable) - [x] Code is easy to understand - [x] Doc comments are used for all functions, enums, structs, and fields (where appropriate) - [x] All tests pass - [x] Performance has not regressed (assuming change was not to fix a bug) - [ ] Version number has been updated in `helix-cli/Cargo.toml` and `helixdb/Cargo.toml` ## Additional Notes ### None
2 parents a2cb3a1 + 02a32cb commit 39daa1a

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

helix-cli/src/utils.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,15 @@ pub const DEFAULT_SCHEMA: &str = r#"// Start building your schema here.
6565
//
6666
// N::User {
6767
// Name: String,
68-
// Label: String,
69-
// Age: Integer,
68+
// Age: I32,
7069
// IsAdmin: Boolean,
7170
// }
7271
//
7372
// E::Knows {
7473
// From: User,
7574
// To: User,
7675
// Properties: {
77-
// Since: Integer,
76+
// Since: Date DEFAULT NOW,
7877
// }
7978
// }
8079
//
@@ -93,7 +92,7 @@ pub const DEFAULT_QUERIES: &str = r#"// Start writing your queries here.
9392
// RETURN {variable}
9493
//
9594
// Example:
96-
// QUERY GetUserFriends(user_id: String) =>
95+
// QUERY GetUserFriends(user_id: ID) =>
9796
// friends <- N<User>(user_id)::Out<Knows>
9897
// RETURN friends
9998
//

hql-tests/tests/negating_exists/queries.hx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// RETURN {variable}
99
//
1010
// Example:
11-
// QUERY GetUserFriends(user_id: String) =>
11+
// QUERY GetUserFriends(user_id: ID) =>
1212
// friends <- N<User>(user_id)::Out<Knows>
1313
// RETURN friends
1414
//

hql-tests/tests/negating_exists/schema.hx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,15 @@
1616
//
1717
// N::User {
1818
// Name: String,
19-
// Label: String,
20-
// Age: Integer,
19+
// Age: I32,
2120
// IsAdmin: Boolean,
2221
// }
2322
//
2423
// E::Knows {
2524
// From: User,
2625
// To: User,
2726
// Properties: {
28-
// Since: Integer,
27+
// Since: Date DEFAULT NOW,
2928
// }
3029
// }
3130
//

0 commit comments

Comments
 (0)