⌘K ctrl+k
Search Shortcut cmd + k | ctrl + k
DuckDB 2.0 ドキュメント 全文検索
per page, with , order by , clip by
Results of 1 - 10 of about 10 for typeof (0.006 sec.)
Variant Functions 12174
This section describes functions that operate on the VARIANT type . New Most variant_* functions were introduced in DuckDB 2.0. The variant_extract , variant_normalize and variant_typeof functions were already available in DuckDB 1.5. Name ... Description variant_typeof(v) Return the full type of a VARIANT value, including nested structure. variant_type(v) Return the top-level type category ... ll key , value pairs in the group. variant_group_array(x) Aggregate. Collect all values of x into a VARIANT array. variant_typeof(v) | Description | Return the full type of a VARIANT value, including nested structure. | | Example | variant_typeof('{"a" ...
https://man.mtool.work/duckdb/2.0/sql/functions/variant.html
Utility Functions 10708
Scalar Utility Functions The functions below are difficult to categorize into specific function types and are broadly useful. Name Description alias(column) Return the name of the column. can_cast_implicitly(source_value, target_value) Whet ... _size(database) Returns the block size of the attached database with the given name. get_type(expression) Returns the data type of the result of the expression as a value of type TYPE . getenv(var) Returns the value of the environment variable var . On ... e a human-readable byte size string (e.g., '16 KiB' ) into a UBIGINT number of bytes. Throws an error on invalid input. pg_typeof(expression) Returns the lower case name of the data type of the result of the expression. For PostgreSQL compatibility. qu ... transaction's identifier, a UBIGINT value. It will assign a new one if the current transaction does not have one already. typeof(expression) Returns the name of the data type of the result of the expression. uuid() Return a random UUID (UUIDv4) simila ...
https://man.mtool.work/duckdb/2.0/sql/functions/utility.html
Numeric Types 10458
Fixed-Width Integer Types The types TINYINT , SMALLINT , INTEGER , BIGINT and HUGEINT store whole numbers, that is, numbers without fractional components, of various ranges. Attempts to store values outside of the allowed range will result ... trailing comma after the WIDTH is accepted. The following spellings therefore all bind to a concrete decimal type: SELECT typeof(1.5::DECIMAL) AS "DECIMAL", typeof(1.5::DECIMAL()) AS "DECIMAL()", typeof(1.5::DECIMAL(10)) AS "DECIMAL(10)", typeof(1.5:: ...
https://man.mtool.work/duckdb/2.0/sql/data_types/numeric.html
Conversion between DuckDB and Python 9725
This page documents the rules for converting DuckDB results to Python and Python objects to DuckDB . Result Conversion: DuckDB Results to Python A result is read from a relation or, when using the DB-API / con.execute() , from the connectio ... fluence the conversion: import duckdb from duckdb.sqltypes import TINYINT con = duckdb.connect() print(con.execute("SELECT typeof(?), typeof(?), typeof(?)", [5, 2**64, duckdb.Value(5, TINYINT)]).fetchall()) [('INTEGER', 'HUGEINT', 'TINYINT')] float A f ... its bytes are read as the characters 0 and 1 , as in duckdb.Value(b"0101", duckdb.sqltypes.BIT) . list list becomes a LIST type of the “most permissive” type of its children. For example, [12345, "test"] becomes VARCHAR[] , because 12345 can convert to ... UCT with string field names: my_mixed_dict = {1: "one", "2": 2, "three": [1, 2, 3], False: True} print(con.execute("SELECT typeof(?)", [my_mixed_dict]).fetchone()[0]) STRUCT("1" VARCHAR, "2" INTEGER, three INTEGER[], "False" BOOLEAN) A dict returned by ...
https://man.mtool.work/duckdb/2.0/clients/python/conversion.html
Variant Type 9725
The VARIANT type stores typed, binary data where each row is self-contained with its own type information. This differs from the JSON type , which is physically stored as text. Because type metadata is embedded per-value, VARIANT provides b ... VARIANT objects are sorted: {'name': 'Alice', 'age': 30}::VARIANT is returned as {'age': 30, 'name': Alice} . Checking the Type of a Value Use variant_typeof to inspect the underlying type of each row: SELECT id, data, variant_typeof(data) AS vtype FRO ...
https://man.mtool.work/duckdb/2.0/sql/data_types/variant.html
Casting 7740
Casting refers to the operation of converting a value in a particular data type to the corresponding value in another data type. Casting can occur either implicitly or explicitly. The syntax described here performs an explicit cast. More in ... S INTEGER) AS i; i NULL cast_to_type Function The cast_to_type function allows generating a cast from an expression to the type of another column. For example: SELECT cast_to_type('42', NULL::INTEGER) AS result; ┌───────┐ │ res │ │ int32 │ ├───────┤ │ ... BLE tbl (i INT, s VARCHAR); INSERT INTO tbl VALUES (42, 'hello world'); CREATE MACRO conditional_add(col, nr) AS CASE WHEN typeof(col) == 'INTEGER' THEN cast_to_type(col::INTEGER + nr, col) ELSE col END; SELECT conditional_add(COLUMNS(*), 100) FROM tbl ...
https://man.mtool.work/duckdb/2.0/sql/expressions/cast.html
Comparisons 7740
Comparison Operators The table below shows the standard comparison operators. Whenever either of the input arguments is NULL , the output of the comparison is NULL . Operator Description Example Result < less than 2 < 3 true > greater than ... type-checking for DuckDB's comparison operators. If you require stricter type-checking, consider creating a macro with the typeof function or implementing a user-defined function . BETWEEN and IS [NOT] NULL Besides the standard comparison operators the ...
https://man.mtool.work/duckdb/2.0/sql/expressions/comparison_operators.html
Geometry Functions 7740
This section describes the functions for examining and manipulating GEOMETRY values. The spatial extension provides additional functions for working with GEOMETRY values, which are documented in the Spatial Functions section. Geometry Opera ... 4 | ST_SetCRS function | Description | Sets the Coordinate Reference System (CRS) identifier of the geometry | | Example | typeof(ST_SetCRS('POINT(1 2)'::GEOMETRY, 'OGC:CRS84')) | | Result | GEOMETRY('OGC:CRS84') | ...
https://man.mtool.work/duckdb/2.0/sql/functions/geometry.html
CSV Auto Detection 6757
When using read_csv , the system tries to automatically infer how to read the CSV file using the CSV sniffer . This step is necessary because CSV files are not self-describing and come in many different dialects. The auto-detection works ro ... ad for sampling: SELECT * FROM read_csv('my_csv_file.csv', sample_size = -1); The way sampling is performed depends on the type of file. If we are reading from a regular file on disk, we will jump into the file and try to sample from different location ... _candidates option: any valid type definition is acceptable to the types -option. (To get a valid type definition, use the typeof() function, or use the column_type column of the DESCRIBE result.) The sniff_csv() function's Column field returns a struc ...
https://man.mtool.work/duckdb/2.0/data/csv/auto_detection.html
Struct Data Type 6525
Conceptually, a STRUCT column contains an ordered list of columns called “entries”. The entries are referenced by name using strings. This document refers to those entry names as keys. Each row in the STRUCT column must have the same keys. ... S t FROM (SELECT 1 AS x, 'a' AS y); A single-element tuple can be created with row(x) or with a trailing comma, (x,) . The type of a tuple is written as TUPLE(⟨type_1⟩, ..., ⟨type_n⟩) : SELECT typeof((1, 'a')) AS type; TUPLE(INTEGER, VARCHAR) Accessing ...
https://man.mtool.work/duckdb/2.0/sql/data_types/struct.html
PREV 1 NEXT
DuckDB 2.0 Documentation / man.mtool.work