Skip to content

Commit 4dfe808

Browse files
committed
request schema
1 parent 7db48f3 commit 4dfe808

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

c/include/arrow-adbc/adbc.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2293,6 +2293,31 @@ AdbcStatusCode AdbcStatementExecuteSchema(struct AdbcStatement* statement,
22932293
struct ArrowSchema* schema,
22942294
struct AdbcError* error);
22952295

2296+
/// \brief Request the schema of the next statement execution
2297+
///
2298+
/// Allows the caller to request a specific schema based on prior
2299+
/// information or user input. This may be used to ensure a
2300+
/// consistent schema when executing queries against a database
2301+
/// with row-based types (e.g., SQLite) or a database whose types
2302+
/// are implemented with row-based parameters where Arrow prefers
2303+
/// type-level parameters (e.g., NUMERIC for PostgreSQL). Callers
2304+
/// may also use a transformation of the schema provided by
2305+
/// AdbcStatementExecuteSchema to request specific Arrow type
2306+
/// variants such as string views or list views.
2307+
///
2308+
/// \since ADBC API revision 1.2.0
2309+
///
2310+
/// \param[in] statement The statement to execute.
2311+
/// \param[in] schema The requested schema.
2312+
/// \param[out] error An optional location to return an error
2313+
/// message if necessary.
2314+
///
2315+
/// \return ADBC_STATUS_NOT_IMPLEMENTED if the driver does not support this.
2316+
ADBC_EXPORT
2317+
AdbcStatusCode AdbcStatementRequestSchema(struct AdbcStatement* statement,
2318+
struct ArrowSchema* schema,
2319+
struct AdbcError* error);
2320+
22962321
/// \brief Turn this statement into a prepared statement to be
22972322
/// executed multiple times.
22982323
///

0 commit comments

Comments
 (0)