Skip to content

Commit 005a9ee

Browse files
committed
add examples/definition
1 parent dca687d commit 005a9ee

File tree

2 files changed

+148
-36
lines changed
  • c/include/arrow-adbc
  • go/adbc/drivermgr/arrow-adbc

2 files changed

+148
-36
lines changed

c/include/arrow-adbc/adbc.h

Lines changed: 47 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,6 +1411,10 @@ struct ADBC_EXPORT AdbcDriver {
14111411
struct AdbcError*);
14121412
AdbcStatusCode (*MultiResultSetRelease)(struct AdbcMultiResultSet*, struct AdbcError*);
14131413

1414+
AdbcStatusCode (*ConnectionGetObjectsRoutines)(struct AdbcConnection*, const char*,
1415+
const char*, const char*, int, int,
1416+
struct ArrowArrayStream*,
1417+
struct AdbcError*);
14141418
AdbcStatusCode (*ConnectionSetWarningHandler)(struct AdbcConnection*,
14151419
AdbcWarningHandler handler,
14161420
void* user_data, struct AdbcError*);
@@ -1993,60 +1997,66 @@ AdbcStatusCode AdbcConnectionGetObjects(struct AdbcConnection* connection, int d
19931997
///
19941998
/// The result is an Arrow dataset with the following schema:
19951999
///
1996-
/// | Field Name | Field Type |
1997-
/// |--------------------------|-------------------------|
1998-
/// | catalog_name | utf8 |
1999-
/// | catalog_db_schemas | list<DB_SCHEMA_SCHEMA> |
2000+
/// | Field Name | Field Type |
2001+
/// |-----------------------------|-------------------------|
2002+
/// | catalog_name | utf8 |
2003+
/// | catalog_db_schemas | list<DB_SCHEMA_SCHEMA> |
20002004
///
20012005
/// DB_SCHEMA_SCHEMA is a Struct with fields:
20022006
///
2003-
/// | Field Name | Field Type |
2004-
/// |--------------------------|-------------------------|
2005-
/// | db_schema_name | utf8 |
2006-
/// | db_schema_routines | list<ROUTINE_SCHEMA> |
2007+
/// | Field Name | Field Type |
2008+
/// |-----------------------------|-------------------------|
2009+
/// | db_schema_name | utf8 |
2010+
/// | db_schema_routines | list<ROUTINE_SCHEMA> |
20072011
///
20082012
/// ROUTINE_SCHEMA is a Struct with fields:
20092013
///
2010-
/// | Field Name | Field Type | Comments |
2011-
/// |--------------------------|-------------------------|----------|
2012-
/// | routine_name | utf8 not null | |
2013-
/// | routine_specific_name | utf8 not null | (1) |
2014-
/// | routine_type | utf8 not null | (2) |
2015-
/// | routine_remarks | utf8 | (3) |
2016-
/// | routine_parameters | list<PARAMETER_SCHEMA> | (4) |
2017-
/// | routine_result | list<PARAMETER_SCHEMA> | (4) |
2018-
/// | routine_parameter_schema | binary | (5) |
2019-
/// | routine_result_schema | binary | (5) |
2014+
/// | Field Name | Field Type | Comments |
2015+
/// |-----------------------------|-------------------------|----------|
2016+
/// | routine_name | utf8 not null | |
2017+
/// | routine_specific_name | utf8 not null | (1) |
2018+
/// | routine_type | utf8 not null | (2) |
2019+
/// | routine_remarks | utf8 | (3) |
2020+
/// | routine_examples | list<utf8> | (3) |
2021+
/// | routine_definition | utf8 | (4) |
2022+
/// | routine_definition_language | utf8 | (4) |
2023+
/// | routine_parameters | list<PARAMETER_SCHEMA> | (5) |
2024+
/// | routine_result | list<PARAMETER_SCHEMA> | (5) |
2025+
/// | routine_parameter_schema | binary | (6) |
2026+
/// | routine_result_schema | binary | (6) |
20202027
///
20212028
/// 1. A name that uniquely identifies the routine, to disambiguate
20222029
/// overloads.
20232030
/// 2. 'FUNCTION', 'PROCEDURE', or a vendor-specific name (e.g. 'TABLE
20242031
/// FUNCTION').
2025-
/// 3. Vendor-specific description of the routine.
2026-
/// 4. Metadata about the accepted parameters and return values as structured
2032+
/// 3. Vendor-specific description or help text, along with examples of the
2033+
/// syntax.
2034+
/// 4. The definition (e.g. SQL text used to create a procedure) and the
2035+
/// language of the definition (e.g. SQL, Python)
2036+
/// 5. Metadata about the accepted parameters and return values as structured
20272037
/// Arrow data. Only populated if include_columns is set, otherwise null.
2028-
/// 5. Metadata about the accepted parameters and return values as an Arrow
2038+
/// 6. Metadata about the accepted parameters and return values as an Arrow
20292039
/// schema, serialized as an IPC message containing a schema Flatbuffers
20302040
/// structure. Only populated if include_arrow_schema is set, otherwise
20312041
/// null.
20322042
///
20332043
/// PARAMETER_SCHEMA is a Struct with fields:
20342044
///
2035-
/// | Field Name | Field Type | Comments |
2036-
/// |--------------------------|-------------------------|----------|
2037-
/// | param_name | utf8 not null | |
2038-
/// | ordinal_position | int32 | (1) |
2039-
/// | remarks | utf8 | (2) |
2040-
/// | param_type | utf8 | (3) |
2041-
/// | xdbc_data_type | int16 | (3) |
2042-
/// | xdbc_type_name | utf8 | (3) |
2043-
/// | xdbc_precision | int32 | (3) |
2044-
/// | xdbc_length | int32 | (3) |
2045-
/// | xdbc_scale | int16 | (3) |
2046-
/// | xdbc_num_prec_radix | int16 | (3) |
2047-
/// | xdbc_nullable | int16 | (3) |
2048-
/// | xdbc_char_octet_length | int32 | (3) |
2049-
/// | xdbc_is_nullable | utf8 | (3) |
2045+
/// | Field Name | Field Type | Comments |
2046+
/// |-----------------------------|-------------------------|----------|
2047+
/// | param_name | utf8 not null | |
2048+
/// | ordinal_position | int32 | (1) |
2049+
/// | remarks | utf8 | (2) |
2050+
/// | param_type | utf8 | (3) |
2051+
/// | xdbc_data_type | int16 | (3) |
2052+
/// | xdbc_type_name | utf8 | (3) |
2053+
/// | xdbc_precision | int32 | (3) |
2054+
/// | xdbc_length | int32 | (3) |
2055+
/// | xdbc_scale | int16 | (3) |
2056+
/// | xdbc_num_prec_radix | int16 | (3) |
2057+
/// | xdbc_nullable | int16 | (3) |
2058+
/// | xdbc_char_octet_length | int32 | (3) |
2059+
/// | xdbc_is_nullable | utf8 | (3) |
20502060
///
20512061
/// 1. The ordinal position of the parameter or return value (1-indexed).
20522062
/// 2. Vendor-specific description of the parameter or return value.
@@ -2055,6 +2065,7 @@ AdbcStatusCode AdbcConnectionGetObjects(struct AdbcConnection* connection, int d
20552065
/// xdbc_ values are meant to provide JDBC/ODBC-compatible metadata
20562066
/// in an agnostic manner.
20572067
///
2068+
/// \since ADBC API revision 1.2.0
20582069
/// \param[in] connection The database connection.
20592070
/// \param[in] catalog Only show routines in the given catalog. If NULL,
20602071
/// do not filter by catalog. If an empty string, only show routines

go/adbc/drivermgr/arrow-adbc/adbc.h

Lines changed: 101 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)