Should the SurrealQL type conversion functions in the type
module be moved into a separate submodule?
#4676
matthewjnield
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
The SurrealQL functions module
type
(https://surrealdb.com/docs/surrealdb/surrealql/functions/database/type) currently contains three broad groups of functions:Functions that check whether an input value is of a certain type, such as
type::is::string
. All of these functions are contained in the submoduletype::is
, whose name effectively signals the intent that the function is checking for the given type.Functions that convert/coerce an input value to a certain type, such as
type::string
. All of these functions are currently contained directly in the moduletype
.The
type::field
andtype::fields
functions.I think that moving the second category of functions, which convert/coerce their input value to a certain type, into their own submodule would have the following benefits:
type::is
submodule.type
module and their purposes, slightly improving the experience of those learning SurrealQL.Ideas for clear names for this submodule that come to mind include
type::as
andtype::convert
.Beta Was this translation helpful? Give feedback.
All reactions