Title: Document define_table statement and support owned const for PermissionType
Description:
This PR includes several changes to improve the usability of surrealdb-orm and its documentation. Here's a brief overview of what has been done:
Documentation for the define_table statement has been added in the table.md file. The document provides a thorough explanation of the statement's usage, syntax, and several examples.
CanOrder trait has been exported at the root level to improve ease of access.
The From<Fors> and From<Raw> implementations for PermissionType have been expanded to support owned const values, leading to more flexible and convenient usage of permissions.
Changes:
rust/surrealdb-orm-tests/tests/query_insert.rs: Removed the usage of CanOrder from the import statement as it's now exported at the root level.
rust/surrealdb-orm-tests/tests/query_select.rs: Similar changes made as in query_insert.rs.
rust/surrealdb-orm-tests/tests/test_query_strings.rs: Removed the usage of CanOrder from the import statement.
rust/surrealdb-orm/docs/en/src/statements/define/table.md: Added comprehensive documentation for the define_table statement, covering its syntax and several examples.
rust/surrealdb-query-builder/src/lib.rs: Exported CanOrder trait at root level.
rust/surrealdb-query-builder/src/statements/define_table.rs: Modified tests to reflect the changes related to the handling of permissions.
rust/surrealdb-query-builder/src/statements/for_.rs: Expanded the From<Fors> and From<Raw> implementations for PermissionType to support owned const values.
rust/surrealdb-query-builder/src/statements/mod.rs: Updated the import statement for Order and CanOrder.
Testing:
All the unit tests have been updated to reflect these changes and all are passing. Further testing might be required in the form of integration tests to ensure the new implementations do not affect existing functionality.
Please review and let me know if any changes are required.
Title: Document
define_table
statement and support ownedconst
forPermissionType
Description:
This PR includes several changes to improve the usability of
surrealdb-orm
and its documentation. Here's a brief overview of what has been done:Documentation for the
define_table
statement has been added in thetable.md
file. The document provides a thorough explanation of the statement's usage, syntax, and several examples.CanOrder
trait has been exported at the root level to improve ease of access.The
From<Fors>
andFrom<Raw>
implementations forPermissionType
have been expanded to support ownedconst
values, leading to more flexible and convenient usage of permissions.Changes:
rust/surrealdb-orm-tests/tests/query_insert.rs
: Removed the usage ofCanOrder
from the import statement as it's now exported at the root level.rust/surrealdb-orm-tests/tests/query_select.rs
: Similar changes made as inquery_insert.rs
.rust/surrealdb-orm-tests/tests/test_query_strings.rs
: Removed the usage ofCanOrder
from the import statement.rust/surrealdb-orm/docs/en/src/statements/define/table.md
: Added comprehensive documentation for thedefine_table
statement, covering its syntax and several examples.rust/surrealdb-query-builder/src/lib.rs
: ExportedCanOrder
trait at root level.rust/surrealdb-query-builder/src/statements/define_table.rs
: Modified tests to reflect the changes related to the handling of permissions.rust/surrealdb-query-builder/src/statements/for_.rs
: Expanded theFrom<Fors>
andFrom<Raw>
implementations forPermissionType
to support ownedconst
values.rust/surrealdb-query-builder/src/statements/mod.rs
: Updated the import statement forOrder
andCanOrder
.Testing:
All the unit tests have been updated to reflect these changes and all are passing. Further testing might be required in the form of integration tests to ensure the new implementations do not affect existing functionality.
Please review and let me know if any changes are required.
Contributors:
@Oyelowo