/
githubmirror
/
goose
Обзор
Документация
Войти
/
githubmirror
/
goose
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
database/dialect/querier_extended.go
22 строки
882 B
Michael Fridman
Expose dialect Querier (#939)
25 май 2025, 21:29
Не верифицирован
25 май 2025, 21:29
8e741fa
Код
Авторство
О чём код?
package dialect // QuerierExtender extends the [Querier] interface with optional database-specific optimizations. // While not required, implementing these methods can improve performance. // // IMPORTANT: This interface may be expanded in future versions. Implementors must be prepared to // update their implementations when new methods are added. // // Example compile-time check: // // var _ QuerierExtender = (*CustomQuerierExtended)(nil) // // In short, it's exported to allow implementors to have a compile-time check that they are // implementing the interface correctly. type QuerierExtender interface { Querier // TableExists returns a database-specific SQL query to check if a table exists. For example, // implementations might query system catalogs like pg_tables or sqlite_master. Return empty // string if not supported. TableExists(tableName string) string }