good morning!!!!

Skip to content
Snippets Groups Projects
Commit b584fa6e authored by José Carlos Nieto's avatar José Carlos Nieto
Browse files

Adding HasTable() method, to determine if a table has already been added to the in-memory schema.

parent 4efce5d9
Branches
Tags
No related merge requests found
...@@ -33,3 +33,10 @@ func (d *DatabaseSchema) Table(name string) *TableSchema { ...@@ -33,3 +33,10 @@ func (d *DatabaseSchema) Table(name string) *TableSchema {
d.AddTable(name) d.AddTable(name)
return d.TableInfo[name] return d.TableInfo[name]
} }
func (d *DatabaseSchema) HasTable(name string) bool {
if _, ok := d.TableInfo[name]; ok {
return true
}
return false
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment