ITADN

Documentation: OMIT type::fields() fails to exclude fields in schemaless tables as shown in documentation

#1716Openthinkincloud 创建于 2026-04-11
documentation
T
thinkincloudcommented
### Description Description The documentation for OMIT clause with type::fields() suggests that it can be used to exclude specific fields. However, in practice (tested in Surrealist and CLI), type::fields(["name", "id"]) returns [NONE, NONE], causing the SELECT statement to return all fields without any omissions. Documentation URL https://surrealdb.com/docs/surrealql/parameters Reproduction Steps Run the following queries in a fresh environment: SQL ``` CREATE person SET name = "Galen", surname = "Pathwarden", age = 19; -- According to docs, this should exclude 'name' and 'id' SELECT * OMIT type::fields(["name", "id"]) FROM person; ``` Expected Behavior The output should exclude the name and id fields: JSON [ { "age": 19, "surname": "Pathwarden" } ] Actual Behavior The output includes all fields, and running RETURN type::fields(["name", "id"]) standalone returns [NONE, NONE]. JSON [ { "age": 19, "id": "person:...", "name": "Galen", "surname": "Pathwarden" } ] ### Is there an existing issue for this? - [x] I have searched the existing issues ### Code of Conduct - [x] I agree to follow this project's Code of Conduct
2 条评论