From b584fa6e9ee41a4dbc9dd1fac720dfd20b2a253a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Carlos=20Nieto?= <jose.carlos@menteslibres.net> Date: Tue, 16 Sep 2014 08:17:38 -0500 Subject: [PATCH] Adding HasTable() method, to determine if a table has already been added to the in-memory schema. --- util/schema/main.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/util/schema/main.go b/util/schema/main.go index 542ac4cb..d0f3fbff 100644 --- a/util/schema/main.go +++ b/util/schema/main.go @@ -33,3 +33,10 @@ func (d *DatabaseSchema) Table(name string) *TableSchema { d.AddTable(name) return d.TableInfo[name] } + +func (d *DatabaseSchema) HasTable(name string) bool { + if _, ok := d.TableInfo[name]; ok { + return true + } + return false +} -- GitLab