* gaflightsql_client_prepare: * @client: A #GAFlightSQLClient. * @query: A query to be prepared in the UTF-8 format. * @options: (nullable): A #GAFlightCallOptions. * @error: (nullable): Return location for a #GError or %NULL. * * Returns: (nullable) (transfer full): The #GAFlightSQLPreparedStatement * on success, %NULL on error. * * Since: 14.0.0 */
| 585 | * Since: 14.0.0 |
| 586 | */ |
| 587 | GAFlightSQLPreparedStatement * |
| 588 | gaflightsql_client_prepare(GAFlightSQLClient *client, |
| 589 | const gchar *query, |
| 590 | GAFlightCallOptions *options, |
| 591 | GError **error) |
| 592 | { |
| 593 | auto flight_sql_client = gaflightsql_client_get_raw(client); |
| 594 | arrow::flight::FlightCallOptions flight_default_options; |
| 595 | auto flight_options = &flight_default_options; |
| 596 | if (options) { |
| 597 | flight_options = gaflight_call_options_get_raw(options); |
| 598 | } |
| 599 | auto result = flight_sql_client->Prepare(*flight_options, query); |
| 600 | if (!garrow::check(error, result, "[flight-sql-client][prepare]")) { |
| 601 | return nullptr; |
| 602 | } |
| 603 | auto flight_sql_statement = std::move(*result); |
| 604 | return gaflightsql_prepared_statement_new_raw(&flight_sql_statement, client); |
| 605 | } |
| 606 | |
| 607 | G_END_DECLS |
| 608 |
nothing calls this directly
no test coverage detected