⌘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 22 for throws (0.002 sec.)
Write User Defined Functions 15016
Overview The JDBC driver can register user-defined functions (UDFs) written in Java, including scalar functions and table functions. This page covers building and registering both, from the simple functional-interface overloads to the vecto ... s its result throw DuckDBFunctions.FunctionException , an unchecked RuntimeException . An out-of-range row or column index throws IndexOutOfBoundsException . Registration-time problems, such as an undefined return type or an invalid type declaration, t ... ew DuckDBTableFunction<Integer, AtomicBoolean, Object>() { @Override public Integer bind(DuckDBTableFunctionBindInfo info) throws Exception { info.addResultColumn("col1", Integer.TYPE) .addResultColumn("col2", String.class); DuckDBValue param = info.ge ... tParameter(0); return param.getInt(); } @Override public AtomicBoolean init(DuckDBTableFunctionInitInfo info) throws Exception { return new AtomicBoolean(false); } @Override public long apply(DuckDBTableFunctionCallInfo info, DuckDBDataChu ...
https://man.mtool.work/duckdb/2.0/clients/java/functions.html
Timestamp Functions 9780
This section describes functions and operators for examining and manipulating TIMESTAMP values . See also the related TIMESTAMPTZ functions . Timestamp Operators The table below shows the available mathematical operators for TIMESTAMP types ... ptime(text, format-list) Converts the string text to timestamp applying the format strings in the list until one succeeds. Throws an error on failure. To return NULL on failure, use try_strptime . strptime(text, format) Converts the string text to time ... stamp according to the format string . Throws an error on failure. To return NULL on failure, use try_strptime . time_bucket(bucket_width, timestamp[, offset]) Truncate ... at-list) | Description | Converts the string text to timestamp applying the format strings in the list until one succeeds. Throws an error on failure. To return NULL on failure, use try_strptime . | | Example | strptime('4/15/2023 10:56:00', ['%d/%m/%Y ...
https://man.mtool.work/duckdb/2.0/sql/functions/timestamp.html
Swift Client 9578
DuckDB has a Swift client. See the announcement post for details. Instantiating DuckDB DuckDB supports both in-memory and persistent databases. To work with an in-memory database, run: let database = try Database(store: .inMemory) To work w ... ation final class ExoplanetStore { // Factory method to create and prepare a new ExoplanetStore static func create() async throws -> ExoplanetStore { // Create our database and connection as described above let database = try Database(store: .inMemory) ... ta extension ExoplanetStore { // Retrieves the number of exoplanets discovered by year func groupedByDiscoveryYear() async throws -> DataFrame { // Issue the query we described above let result = try connection.query(""" SELECT disc_year, count(disc_ye ...
https://man.mtool.work/duckdb/2.0/clients/tertiary_clients/swift.html
UPDATE Statement 9578
The UPDATE statement modifies the values of rows in a table. Examples For every row where i is NULL , set the value to 0 instead: UPDATE tbl SET i = 0 WHERE i IS NULL; Set all values of i to 1 and all values of j to 2: UPDATE tbl SET i = 1, ... e that each target row matches at most one source row, e.g., by deduplicating the source. In contrast, the sub-select form throws an error if the subquery returns more than one row (unless the scalar_subquery_error_on_multiple_rows setting is set to fa ... lse ), and MERGE INTO throws an error if a target row matches more than one source row. Update from Same Table The only difference between this case an ...
https://man.mtool.work/duckdb/2.0/sql/statements/update.html
Blob Functions 9191
This section describes functions and operators for examining and manipulating BLOB values . Function Description arg1 || arg2 Concatenates two strings, lists, or blobs. Any NULL input results in NULL . See also concat(arg1, arg2, ...) and l ... _error]) Converts blob to VARCHAR . The optional on_error parameter controls handling of invalid UTF-8: 'strict' (default, throws error), 'replace' (replaces invalid characters with ? ), or 'ignore' (removes invalid characters). encode(string) Converts ... iption | Converts blob to VARCHAR . The optional on_error parameter controls handling of invalid UTF-8: 'strict' (default, throws error), 'replace' (replaces invalid characters with ? ), or 'ignore' (removes invalid characters). | | Example | decode('\ ...
https://man.mtool.work/duckdb/2.0/sql/functions/blob.html
Utility Functions 9191
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 ... _threshold' and 'keyword_case' ( 'upper' , 'lower' or 'preserve' ). Provided by the autocomplete extension. error(message) Throws the given error message . equi_width_bins(min, max, bincount, nice := false) Returns the upper boundaries of a partition o ... . parse_formatted_bytes(string) Parse 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 express ... where x=1') | | Result | SELECT a, b\nFROM tbl\nWHERE x = 1 (where \n denotes a newline) | error(message) | Description | Throws the given error message . | | Example | error('access_mode') | equi_width_bins(min, max, bincount, nice := false) | Descri ...
https://man.mtool.work/duckdb/2.0/sql/functions/utility.html
Friendly CLI 8619
Along with our Friendly SQL , we provide friendly CLI features. Dark/Light Mode The CLI automatically detects whether the terminal is using a dark or light background and adjusts syntax highlighting colors accordingly. The mode can also be ... ────┤ │ 42 │ └───────┘ If the last query did not return a result (e.g., because it performed an update operation), the CLI throws an error: Binder Error: Failed to query last result "_": no result available ...
https://man.mtool.work/duckdb/2.0/clients/cli/friendly_cli.html
Python Function API 8417
You can create a DuckDB user-defined function (UDF) from a Python function so it can be used in SQL queries. Similarly to regular functions , they need to have a name, a return type and parameter types. Creating Functions To register a Pyth ... ll" . import duckdb from duckdb.sqltypes import BIGINT def will_throw(): raise ValueError("ERROR") duckdb.create_function("throws", will_throw, [], BIGINT) try: res = duckdb.sql("SELECT throws()").fetchall() except duckdb.InvalidInputException as e: pr ...
https://man.mtool.work/duckdb/2.0/clients/python/function.html
Android 8215
DuckDB has experimental support for Android. Please use the latest main branch of DuckDB instead of the stable versions. Building the DuckDB Library Using the Android NDK We provide build instructions for setups using macOS and Android Stud ... the Python client on Termux: pip install --pre --upgrade duckdb Troubleshooting Log Library Is Missing Problem: The build throws the following error: ld.lld: error: undefined symbol: __android_log_write Solution: Make sure the log library is linked: e ...
https://man.mtool.work/duckdb/2.0/dev/building/android.html
Directly Reading Files 8030
DuckDB allows directly reading files via the read_text and read_blob functions. These functions accept a filename, a list of filenames, or a glob pattern. They output the content of each file as a VARCHAR or BLOB , respectively, along with ... är DuckDB first validates the file content as valid UTF-8. If read_text attempts to read a file with invalid UTF-8, DuckDB throws an error suggesting to use read_blob instead. read_text also supports reading from pipes (e.g., /dev/stdin ). The maximum ...
https://man.mtool.work/duckdb/2.0/guides/file_formats/read_file.html
PREV 1 2 3 NEXT
DuckDB 2.0 Documentation / man.mtool.work