Results of 1 - 10 of about 100 for once (0.002 sec.)
- Dot Commands 12158
- Dot commands are available in the DuckDB CLI client. To use one of these commands, begin the line with a period ( . ) immediately followed by the name of the command you wish to execute. Additional arguments to the command are entered, spac
...alias. See the external editor mode section .excel Display the output of the next command in a spreadsheet. Equivalent to .once -x .exit ⟨CODE⟩ Exit this program with return-code CODE .headers ⟨on/off⟩ Turn display of headers on or off . Does not app...utput mode .multiline Set multi-line mode (default) .nullvalue ⟨STRING⟩ Use STRING in place of NULL values. Default: NULL .once ⟨OPTIONS⟩ ⟨FILE⟩ Output for the next SQL command only to FILE .open ⟨OPTIONS⟩ ⟨FILE⟩ Close existing database and reopen FI...the DuckDB CLI sends results to the terminal's standard output. However, this can be modified using either the .output or .once commands. Pass in the desired output file location as a parameter. The .once command will only output the next set of resu... - https://man.mtool.work/duckdb/2.0/clients/cli/dot_commands.html
- Write User Defined Functions 10792
- Overview The Rust client can register user-defined functions written in Rust: scalar functions with the vscalar feature and table functions with the vtab feature. Both operate on DuckDB's columnar data chunks, so a single call processes a b
...ments the VScalar trait, registered on a connection with register_scalar_function() . DuckDB calls the function's invoke() once per data chunk, passing a batch of input rows and expecting the corresponding output values written back. signatures() dec...ec<i64> = stmt.query_map([], |row| row.get(0))?.collect::<Result<_>>()?; assert_eq!(values, vec![1, 2, 3, 4, 5]); Ok(()) } Once registered, the function is called from SQL by the name passed to register_scalar_function() : SELECT add_one(41); The ass...ed with register_table_function() and queried like any other table. VTab splits the work across three callbacks: bind runs once when the statement is prepared. It declares the result columns with add_result_column() and reads the call's arguments wit... - https://man.mtool.work/duckdb/2.0/clients/rust/functions.html
- Write User Defined Functions 10103
- Overview The Go client can register user-defined functions written in Go: scalar functions that map input rows to a single output value, and table functions that produce a set of rows. It can also register a replacement scan that rewrites a
...larFuncExecutor holding the callback. The simplest form is RowExecutor , a func(values []driver.Value) (any, error) called once per row. Register an instance on a connection with duckdb.RegisterScalarUDF() . The following defines my_length(VARCHAR) -..."my_length", udf)) var length int32 row := db.QueryRow(`SELECT my_length('hello world')`) check(row.Scan(&length)) // 11 } Once registered, the function is called from SQL by the name passed to RegisterScalarUDF() : SELECT my_length('hello world'); S...k(duckdb.RegisterScalarUDFSet(conn, "my_length", varcharUDF, listUDF)) For a callback that processes a whole data chunk at once rather than a row at a time, set ChunkContextExecutor in the executor instead of RowExecutor ; the scalar_udf example demo... - https://man.mtool.work/duckdb/2.0/clients/go/functions.html
- Write User Defined Functions 9934
- 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
...on() builder — which returns an org.duckdb.DuckDBScalarFunctionBuilder — and register it on a connection with register() . Once registered, the function can be called from SQL by the name passed to withName() . The builder is single-use: it is finali...zed once register() (or close() ) is called. The simplest functions map directly to a Java functional interface. Pick the overload...Exception . Vectorized Scalar Functions The examples above process one value per call. To process a whole batch of rows at once, register a DuckDBScalarFunction with withVectorizedFunction() . The callback receives the input as a DuckDBDataChunkReade... - https://man.mtool.work/duckdb/2.0/clients/java/functions.html
- Execution Format 9414
- Vector is the container format used to store in-memory data during execution. DataChunk is a collection of Vectors, used for instance to represent a column list in a PhysicalProjection operator. Data Flow DuckDB uses a vectorized query exec
...representing the result of a constant expression in a function call, the constant vector allows us to only store the value once. SELECT lst || 'duckdb' FROM range(1000) tbl(lst); Since duckdb is a string literal, the value of the literal is the same...for every row. In a flat vector, we would have to duplicate the literal duckdb once for every row. The constant vector allows us to only store the literal once. Constant vectors are also emitted by the stor...r example you can imagine the scenario where all the parameters to a function are constant, we can just compute the result once and emit a constant vector. But writing specialized code for every combination of vector types for every function is unfea... - https://man.mtool.work/duckdb/2.0/internals/vector.html
- Safe Mode 9245
- The DuckDB CLI client supports “safe mode”. Safe mode can be enabled from the command line using the -safe argument : duckdb -safe Alternatively, it can be activated during a session using the .safe_mode dot command . In safe mode, the CLI
...th the host file system. This has the following effects: The following dot commands are disabled: .cd .excel .import .log .once .open .output .read .sh .system Auto-complete no longer scans the file system for files to suggest as auto-complete target...to or write from files. Functions such as read_csv , read_parquet , read_json , etc. cannot read from an external source. Once safe mode is activated, it cannot be deactivated in the same DuckDB CLI session. For more information on running DuckDB in... - https://man.mtool.work/duckdb/2.0/clients/cli/safe_mode.html
- Run Queries 9076
- Overview DuckDB-Wasm provides functions for querying data. Queries are run sequentially: First, create a connection by calling connect . Then, run queries by calling query to materialize the whole result, or send to fetch result chunks lazi
...ents, converting results to JSON, and exporting to Parquet. Query Execution Use query() when you want the entire result at once, or send() to iterate over Apache Arrow record batches as they are produced — useful for large results that you would rath...er stream than hold in memory all at once: // Create a new connection const conn = await db.connect(); // Either materialize the query result await conn.query<{ v:.../ Close the connection to release memory await conn.close(); Prepared Statements Prepared statements let you parse a query once and run it repeatedly with different parameter values, binding each value in place of a ? placeholder. Both query() (mater... - https://man.mtool.work/duckdb/2.0/clients/wasm/query.html
- Command Line Client 8569
- Installation To use the DuckDB CLI client, visit the CLI installation page . The latest stable version of the DuckDB command line client is 2.0.0. Installation The DuckDB CLI (Command Line Interface) is a single, dependency-free executable.
...ost common uses of the CLI client. If you have tldr installed, you can display it by running tldr duckdb . Getting Started Once the CLI executable has been downloaded, decompress it and save it to any directory. Navigate to that directory in a termin...t database , simply include a path as a command line argument: duckdb my_database.duckdb Running SQL Statements in the CLI Once the CLI has been opened, enter a SQL statement followed by a semicolon, then hit enter and it will be executed. Results wi...the DuckDB CLI sends results to the terminal's standard output. However, this can be modified using either the .output or .once commands. For details, see the documentation for the output dot command . Displaying Function Documentation The .manual co... - https://man.mtool.work/duckdb/2.0/clients/cli/overview.html
- WITH Clause 8569
- The WITH clause allows you to specify common table expressions (CTEs). Regular (non-recursive) common-table-expressions are essentially views that are limited in scope to a particular query. CTEs can reference each other and can be nested.
...T 42 AS i) FROM cte; CTE Materialization DuckDB handles CTEs as materialized by default, meaning that the CTE is evaluated once and the result is stored in a temporary table. However, under certain conditions, DuckDB can inline the CTE into the main...ted in each place it is referenced. Inlining is done using the following heuristics: * The CTE is not referenced more than once. * The CTE does not contain a VOLATILE function. * The CTE is using AS NOT MATERIALIZED and does not use AS MATERIALIZED ....ive, materializing it with the MATERIALIZED keyword can improve performance. In this case, complex_query is evaluated only once. WITH t(x) AS MATERIALIZED (⟨complex_query⟩) SELECT * FROM t AS t1, t AS t2, t AS t3; If one wants to disable materializat... - https://man.mtool.work/duckdb/2.0/sql/query_syntax/with.html
- CREATE TRIGGER Statement 8387
- New The CREATE TRIGGER feature was introduced in DuckDB 2.0. The CREATE TRIGGER statement registers a trigger: a set of SQL statements that run automatically in response to INSERT , UPDATE , or DELETE events on a table. Examples Record ever
...; UPDATE target SET val = val * 10 WHERE id <= 2; SELECT * FROM audit; id old_val new_val 1 10 100 2 20 200 Fire a trigger once per affected row with a row-level AFTER trigger. Row-level triggers refer to the affected row through the NEW and OLD qual...ement is applied. AFTER triggers run after the triggering statement is applied. Granularity FOR EACH ROW fires the trigger once for every row affected by the statement. The triggered statement can refer to the affected row through NEW (for INSERT ) a...(for DELETE ). Row-level UPDATE triggers are not yet supported; see the limitations . FOR EACH STATEMENT fires the trigger once per statement, regardless of how many rows are affected. Use REFERENCING OLD TABLE and NEW TABLE to access the affected ro... - https://man.mtool.work/duckdb/2.0/sql/statements/create_trigger.html
DuckDB 2.0 Documentation / man.mtool.work