MCPcopy Create free account
hub / github.com/apecloud/myduckserver / IsDuckDBTableAlreadyExistsError

Function IsDuckDBTableAlreadyExistsError

catalog/errors.go:18–21  ·  view source on GitHub ↗
(err error)

Source from the content-addressed store, hash-verified

16}
17
18func IsDuckDBTableAlreadyExistsError(err error) bool {
19 return IsDuckDBCatalogError(err) &&
20 (strings.Contains(err.Error(), "Table with name") || strings.Contains(err.Error(), "Could not rename")) && strings.Contains(err.Error(), "already exists")
21}
22
23func IsDuckDBTableNotFoundError(err error) bool {
24 return IsDuckDBCatalogError(err) && strings.Contains(err.Error(), "Table with name") && strings.Contains(err.Error(), "does not exist")

Callers 2

createAllTableMethod · 0.85
RenameTableMethod · 0.85

Calls 1

IsDuckDBCatalogErrorFunction · 0.85

Tested by

no test coverage detected