in csharp/src/Apache.Arrow.Adbc/C/CAdbcDriverImporter.cs [102:172]
private static unsafe void ValidateDriver(ref CAdbcDriver driver, int version)
{
#if NET5_0_OR_GREATER
void* empty = null;
#else
IntPtr empty = IntPtr.Zero;
#endif
if (driver.DatabaseNew == empty) { throw AdbcException.Missing(nameof(driver.DatabaseNew)); }
if (driver.DatabaseInit == empty) { throw AdbcException.Missing(nameof(driver.DatabaseInit)); }
if (driver.DatabaseRelease == empty) { throw AdbcException.Missing(nameof(driver.DatabaseRelease)); }
if (driver.DatabaseSetOption == empty) { driver.DatabaseSetOption = DatabaseSetOptionDefault; }
if (driver.ConnectionNew == empty) { throw AdbcException.Missing(nameof(driver.ConnectionNew)); }
if (driver.ConnectionInit == empty) { throw AdbcException.Missing(nameof(driver.ConnectionInit)); }
if (driver.ConnectionRelease == empty) { throw AdbcException.Missing(nameof(driver.ConnectionRelease)); }
if (driver.ConnectionCommit == empty) { driver.ConnectionCommit = ConnectionCommitDefault; }
if (driver.ConnectionGetInfo == empty) { driver.ConnectionGetInfo = ConnectionGetInfoDefault; }
if (driver.ConnectionGetObjects == empty) { driver.ConnectionGetObjects = ConnectionGetObjectsDefault; }
if (driver.ConnectionGetTableSchema == empty) { driver.ConnectionGetTableSchema = ConnectionGetTableSchemaDefault; }
if (driver.ConnectionGetTableTypes == empty) { driver.ConnectionGetTableTypes = ConnectionGetTableTypesDefault; }
if (driver.ConnectionReadPartition == empty) { driver.ConnectionReadPartition = ConnectionReadPartitionDefault; }
if (driver.ConnectionRollback == empty) { driver.ConnectionRollback = ConnectionRollbackDefault; }
if (driver.ConnectionSetOption == empty) { driver.ConnectionSetOption = ConnectionSetOptionDefault; }
if (driver.StatementExecutePartitions == empty) { driver.StatementExecutePartitions = StatementExecutePartitionsDefault; }
if (driver.StatementExecuteQuery == empty) { throw AdbcException.Missing(nameof(driver.StatementExecuteQuery)); }
if (driver.StatementNew == empty) { throw AdbcException.Missing(nameof(driver.StatementNew)); }
if (driver.StatementRelease == empty) { throw AdbcException.Missing(nameof(driver.StatementRelease)); }
if (driver.StatementBind == empty) { driver.StatementBind = StatementBindDefault; }
if (driver.StatementBindStream == empty) { driver.StatementBindStream = StatementBindStreamDefault; }
if (driver.StatementGetParameterSchema == empty) { driver.StatementGetParameterSchema = StatementGetParameterSchemaDefault; }
if (driver.StatementPrepare == empty) { driver.StatementPrepare = StatementPrepareDefault; }
if (driver.StatementSetOption == empty) { driver.StatementSetOption = StatementSetOptionDefault; }
if (driver.StatementSetSqlQuery == empty) { driver.StatementSetSqlQuery = StatementSetSqlQueryDefault; }
if (driver.StatementSetSubstraitPlan == empty) { driver.StatementSetSubstraitPlan = StatementSetSubstraitPlanDefault; }
if (version < AdbcVersion.Version_1_1_0) { return; }
if (driver.ErrorGetDetailCount == empty) { driver.ErrorGetDetailCount = ErrorGetDetailCountDefault; }
if (driver.ErrorGetDetail == empty) { driver.ErrorGetDetail = ErrorGetDetailDefault; }
if (driver.ErrorFromArrayStream == empty) { driver.ErrorFromArrayStream = ErrorFromArrayStreamDefault; }
if (driver.DatabaseGetOption == empty) { driver.DatabaseGetOption = DatabaseGetOptionDefault; }
if (driver.DatabaseGetOptionBytes == empty) { driver.DatabaseGetOptionBytes = DatabaseGetOptionBytesDefault; }
if (driver.DatabaseGetOptionDouble == empty) { driver.DatabaseGetOptionDouble = DatabaseGetOptionDoubleDefault; }
if (driver.DatabaseGetOptionInt == empty) { driver.DatabaseGetOptionInt = DatabaseGetOptionIntDefault; }
if (driver.DatabaseSetOptionBytes == empty) { driver.DatabaseSetOptionBytes = DatabaseSetOptionBytesDefault; }
if (driver.DatabaseSetOptionDouble == empty) { driver.DatabaseSetOptionDouble = DatabaseSetOptionDoubleDefault; }
if (driver.DatabaseSetOptionInt == empty) { driver.DatabaseSetOptionInt = DatabaseSetOptionIntDefault; }
if (driver.ConnectionCancel == empty) { driver.ConnectionCancel = ConnectionCancelDefault; }
if (driver.ConnectionGetOption == empty) { driver.ConnectionGetOption = ConnectionGetOptionDefault; }
if (driver.ConnectionGetOptionBytes == empty) { driver.ConnectionGetOptionBytes = ConnectionGetOptionBytesDefault; }
if (driver.ConnectionGetOptionDouble == empty) { driver.ConnectionGetOptionDouble = ConnectionGetOptionDoubleDefault; }
if (driver.ConnectionGetOptionInt == empty) { driver.ConnectionGetOptionInt = ConnectionGetOptionIntDefault; }
if (driver.ConnectionGetStatistics == empty) { driver.ConnectionGetStatistics = ConnectionGetStatisticsDefault; }
if (driver.ConnectionGetStatisticNames == empty) { driver.ConnectionGetStatisticNames = ConnectionGetStatisticNamesDefault; }
if (driver.ConnectionSetOptionBytes == empty) { driver.ConnectionSetOptionBytes = ConnectionSetOptionBytesDefault; }
if (driver.ConnectionSetOptionDouble == empty) { driver.ConnectionSetOptionDouble = ConnectionSetOptionDoubleDefault; }
if (driver.ConnectionSetOptionInt == empty) { driver.ConnectionSetOptionInt = ConnectionSetOptionIntDefault; }
if (driver.StatementCancel == empty) { driver.StatementCancel = StatementCancelDefault; }
if (driver.StatementExecuteSchema == empty) { driver.StatementExecuteSchema = StatementExecuteSchemaDefault; }
if (driver.StatementGetOption == empty) { driver.StatementGetOption = StatementGetOptionDefault; }
if (driver.StatementGetOptionBytes == empty) { driver.StatementGetOptionBytes = StatementGetOptionBytesDefault; }
if (driver.StatementGetOptionDouble == empty) { driver.StatementGetOptionDouble = StatementGetOptionDoubleDefault; }
if (driver.StatementGetOptionInt == empty) { driver.StatementGetOptionInt = StatementGetOptionIntDefault; }
if (driver.StatementSetOptionBytes == empty) { driver.StatementSetOptionBytes = StatementSetOptionBytesDefault; }
if (driver.StatementSetOptionDouble == empty) { driver.StatementSetOptionDouble = StatementSetOptionDoubleDefault; }
if (driver.StatementSetOptionInt == empty) { driver.StatementSetOptionInt = StatementSetOptionIntDefault; }
}