Results of 1 - 10 of about 66 for code (0.003 sec.)
- Enum Functions 12115
- This section describes functions and operators for examining and manipulating ENUM values . The examples assume an enum type created as: CREATE TYPE mood AS ENUM ('sad', 'ok', 'happy', 'anxious'); These functions can take NULL or a specific
...Most enum functions return a value that depends only on the type of the argument, and not on its value. The functions enum_code() and enum_range_boundary() are exceptions; they return a value that depends on the argument value, as well as its type. N...ame Description enum_code(enum_value) Returns the (0-based) numeric value backing the given enum value. enum_first(enum) Returns the first value of...um type as an array. enum_range_boundary(enum, enum) Returns the range between the two given enum values as an array. enum_code(enum_value) | Description | Returns the (0-based) numeric value backing the given enum value. | | Example | enum_code('hap... - https://man.mtool.work/duckdb/2.0/sql/functions/enum.html
- UPDATE Statement 12115
- 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,
...FROM clause and express joins via the WHERE clause. For example: CREATE TABLE city (name VARCHAR, revenue BIGINT, country_code VARCHAR); CREATE TABLE country (code VARCHAR, name VARCHAR); INSERT INTO city VALUES ('Paris', 700, 'FR'), ('Lyon', 200, '...and the country tables, and filter on the latter: UPDATE city SET revenue = revenue + 100 FROM country WHERE city.country_code = country.code AND country.name = 'France'; SELECT * FROM city; name revenue country_code Paris 800 FR Lyon 300 FR Brussel... - https://man.mtool.work/duckdb/2.0/sql/statements/update.html
- marimo Notebooks 10574
- marimo is an open-source reactive notebook for Python and SQL that's tightly integrated with DuckDB's Python client, letting you mix and match Python and SQL in a single git-versionable notebook. Unlike traditional notebooks, when you run a
...cell or interact with a UI element, marimo automatically (or lazily) runs affected cells, keeping code and outputs consistent. Its integration with DuckDB makes it well-suited to interactively working with data, and its repre...bottom of your notebook In marimo, SQL cells give the appearance of writing SQL while being serialized as standard Python code using the mo.sql() function, which keeps your notebook as pure Python code without requiring special syntax or magic comma...tirely in the browser with WebAssembly . Next Steps Read the marimo docs . Try the SQL tutorial: marimo tutorial sql . The code for this guide is available on GitHub . Run it with marimo edit ⟨github_url⟩ .... - https://man.mtool.work/duckdb/2.0/guides/python/marimo.html
- Building Configuration 9047
- Build Types DuckDB can be built in many different settings, most of these correspond directly to CMake but not all of them. release This build has been stripped of all the assertions and debug symbols and code, optimized for performance. de
...the special debug defines are not automatically set for this build. relassert This build does not trigger the #ifdef DEBUG code blocks but it still has debug symbols that make it possible to step through the execution with line number information and...create a build, but uses the following format checkers to check for style issues: clang-format to fix format issues in the code. cmake-format to fix format issues in the CMakeLists.txt files. The CI will also run this check, causing it to fail if thi... - https://man.mtool.work/duckdb/2.0/dev/building/build_configuration.html
- Versioning of Extensions 9047
- Extension Versioning Most software has some sort of version number. Version numbers serve a few important goals: Tie a binary to a specific state of the source code Allow determining the expected feature set Allow determining the state of t
...ch as 690bfc5 . What to expect from an extension that has a version number in the unstable format? The state of the source code of the extension can be found by looking up the hash in the extension repository Functionality may change or be removed co...to expect from an extension that has a version number in the pre-release format? The extension is compiled from the source code corresponding to the tag. Semantic Versioning semantics apply. See the Semantic Versioning specification for details. The...nightly build of DuckDB itself. This allows using a specific bleeding-edge feature while limiting the exposure to unstable code. To achieve this, Core Extensions tend to regularly push builds to the core_nightly repository . Let's look at an example:... - https://man.mtool.work/duckdb/2.0/extensions/versioning_of_extensions.html
- ODBC 101: A Duck Themed Guide to ODBC 9047
- What is ODBC? ODBC which stands for Open Database Connectivity, is a standard that allows different programs to talk to different databases including, of course, DuckDB. This makes it easier to build programs that work with many different d
...atabases, which saves time as developers don't have to write custom code to connect to each database. Instead, they can use the standardized ODBC interface, which reduces development time and cos...ata Source or Driver” page of the SQL Server documentation . Error Handling and Diagnostics All functions in ODBC return a code which represents the success or failure of the function. This allows for easy error handling, as the application can simpl...y check the return code of each function call to determine if it was successful. When unsuccessful, the application can then use the SQLGetDiagRec... - https://man.mtool.work/duckdb/2.0/guides/odbc/general.html
- Securing Extensions 9047
- DuckDB has a powerful extension mechanism, which has the same privileges as the user running DuckDB's (parent) process. This introduces security considerations. Therefore, we recommend reviewing the configuration options listed on this page
...t installation of third-party extensions. Community extension repositories like pip or npm are essentially enabling remote code execution by design. This is less dramatic than it sounds. For better or worse, we are quite used to piping random scripts...have picked what we think is a sensible approach: we do not attempt to review the submissions, but require that the source code of extensions is available . We do take over the complete build, sign and distribution process. Note that this is a step u...ution quickly. Despite this, installing and loading DuckDB extensions from the community extension repository will execute code written by third party developers, and therefore can be dangerous. A malicious developer could create and register a harml... - https://man.mtool.work/duckdb/2.0/operations_manual/securing_duckdb/securing_ext...
- Text Functions 9047
- Text Functions and Operators This section describes functions and operators for examining and manipulating STRING values . Function Description string[index] Extracts a single character using a (1-based) index . string[begin:end] Extracts a
...substring using slice conventions . Negative values are accepted. ascii(string) Returns an integer that represents the Unicode code point of the first character of the string . bar(x, min, max[, width]) Draws a band whose width is proportional to (...tring) Number of bits in a string . char_length(string) Alias for length . character_length(string) Alias for length . chr(code_point) Returns a character which is corresponding the ASCII code value or Unicode code point. concat(value, ...) Concatena...an-readable representation using units based on powers of 2 (KiB, MiB, GiB, etc.). from_base64(string) Converts a base64 encoded string to a character string ( BLOB ). from_binary(value) Alias for unbin . from_hex(value) Alias for unhex . greatest(ar... - https://man.mtool.work/duckdb/2.0/sql/functions/text.html
- Connect 8718
- Overview The Go client works through the standard database/sql types: a *sql.DB is a pool of connections to a DuckDB database. This page covers opening in-memory and file-backed databases, passing DuckDB configuration options, running initi
...tement . Running Initialization Steps with a Connector To run setup statements before any query, or to configure DuckDB in code rather than in the DSN, create a Connector with duckdb.NewConnector() and open the database with sql.OpenDB() . The connec...ions and threads interact. Connection Lifetime Temporary objects such as temporary tables are scoped to a connection. When code closes a connection, database/sql may return it to the pool as an idle connection rather than actually closing it, so a te...mporary table can outlive the code that created it. To make closing a connection tear it down, disable idle connections: db.SetMaxIdleConns(0) Closing a Data... - https://man.mtool.work/duckdb/2.0/clients/go/connecting.html
- Securing DuckDB 8718
- DuckDB is a powerful analytical database engine. It can read and write files, access the network, load extensions, and use system resources. Like any powerful tool, these capabilities require appropriate configuration when working with sens
...pplication, also consult the "Embedding DuckDB" page. Untrusted Input Untrusted SQL Input Warning Treat SQL in DuckDB like code in Bash or Python. Do not execute SQL from untrusted sources without proper sandboxing. DuckDB executes SQL with the full...L in DuckDB. If your application must execute SQL from untrusted sources, use additional safeguards when running untrusted code such as: Use duckdb-wasm for sandboxing Run DuckDB in an isolated container (e.g., Docker with restricted capabilities) Us.../etc/passwd ) or access remote URLs. Table and column names: While these are typically identifiers rather than executable code, unsanitized input could lead to unexpected behavior or information disclosure. Filter expressions: Some APIs accept filte... - https://man.mtool.work/duckdb/2.0/operations_manual/securing_duckdb/overview.htm...
DuckDB 2.0 Documentation / man.mtool.work