| 24 | |
| 25 | |
| 26 | void registerDataTypeNothing(DataTypeFactory & factory) |
| 27 | { |
| 28 | factory.registerSimpleDataType("Nothing", [] { return DataTypePtr(std::make_shared<DataTypeNothing>()); }, DataTypeFactory::Case::Sensitive, Documentation{ |
| 29 | .description = R"DOCS_MD( |
| 30 | The only purpose of this data type is to represent cases where a value is not expected. So you can't create a `Nothing` type value. |
| 31 | |
| 32 | For example, literal [NULL](/sql-reference/syntax#null) has type of `Nullable(Nothing)`. See more about [Nullable](../../../sql-reference/data-types/nullable.md). |
| 33 | |
| 34 | The `Nothing` type can also used to denote empty arrays: |
| 35 | |
| 36 | ```sql |
| 37 | SELECT toTypeName(array()) |
| 38 | ``` |
| 39 | |
| 40 | ```text |
| 41 | ┌─toTypeName(array())─┐ |
| 42 | │ Array(Nothing) │ |
| 43 | └─────────────────────┘ |
| 44 | ``` |
| 45 | )DOCS_MD", |
| 46 | .syntax = "Nothing", |
| 47 | .examples = {}, |
| 48 | .related = {}, |
| 49 | }); |
| 50 | } |
| 51 | |
| 52 | } |
no test coverage detected