MCPcopy Create free account
hub / github.com/apache/arrow / gaflightsql_client_prepare

Function gaflightsql_client_prepare

c_glib/arrow-flight-sql-glib/client.cpp:587–605  ·  view source on GitHub ↗

* 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 */

Source from the content-addressed store, hash-verified

585 * Since: 14.0.0
586 */
587GAFlightSQLPreparedStatement *
588gaflightsql_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
607G_END_DECLS
608

Callers

nothing calls this directly

Calls 4

checkFunction · 0.50
PrepareMethod · 0.45

Tested by

no test coverage detected