You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+49-5Lines changed: 49 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,51 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
4
4
5
5
## Project Overview
6
6
7
-
This is a DuckDB extension called `adbc` that integrates Arrow ADBC (Arrow Database Connectivity) with DuckDB. It's built using the DuckDB extension template. Familairize yourself with the ADBC interface.
7
+
This is a DuckDB extension called `adbc` that integrates Arrow ADBC (Arrow Database Connectivity) with DuckDB. It's built using the DuckDB extension template. Familiarize yourself with the ADBC interface.
8
8
9
-
There is a checkout of a similar project under ./odbc-scanner which is the ODBC scanner for DuckDB extension, this adbc extension wants to be very similar to that extension but use the ADBC interface.
9
+
There is a checkout of a similar project under ./odbc-scanner which is the ODBC scanner for DuckDB extension. This adbc extension is modeled after that extension but uses the ADBC interface instead.
10
10
11
-
There is also a checkout of the Airport DuckDB extension under ./airport. The Airport extension integrates DuckDB with Apache Arrow Flight, but it demonstrates C++ code that can read Arrow record batches and return them to DuckDB. The docs for the extension are under ./airports/docs/README.md, but you're mostly going to be interested in airport_take_flight.cpp.
11
+
There is also a checkout of the Airport DuckDB extension under ./airport. The Airport extension integrates DuckDB with Apache Arrow Flight and demonstrates C++ code that can read Arrow record batches and return them to DuckDB. The docs are under ./airport/docs/README.md, but you're mostly interested in airport_take_flight.cpp.
12
+
13
+
## Extension Functions
14
+
15
+
The extension provides the following functions:
16
+
17
+
### Connection Management
18
+
-`adbc_connect(options)` - Connect to an ADBC data source. Returns a connection handle (BIGINT). Options can be passed as a STRUCT (preferred) or MAP. The `driver` option is required.
19
+
-`adbc_disconnect(handle)` - Disconnect from an ADBC data source. Returns true on success.
20
+
21
+
### Query Execution
22
+
-`adbc_scan(handle, query, [params := row(...)])` - Execute a SELECT query and return results as a table. Supports parameterized queries via the optional `params` named parameter.
-**Extension class**: `src/include/adbc_extension.hpp` - Defines `AdbcExtension` class inheriting from `duckdb::Extension`
57
101
-**Configuration**: `extension_config.cmake` - Tells DuckDB build system to load this extension
58
102
-**Dependencies**: `vcpkg.json` - Depends on `arrow-adbc` via vcpkg with custom overlay ports in `vcpkg-overlay/`
59
103
60
-
The extension currently registers a scalar function `adbc(varchar) -> varchar`. The ADBC driver manager is linked statically via `AdbcDriverManager::adbc_driver_manager_static`.
104
+
The ADBC driver manager is linked statically via `AdbcDriverManager::adbc_driver_manager_static`.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
0 commit comments