diff --git a/gb.db.mysql/src/gb.db.mysql/.info b/gb.db.mysql/src/gb.db.mysql/.info index bed13e73a..b19ca7977 100644 --- a/gb.db.mysql/src/gb.db.mysql/.info +++ b/gb.db.mysql/src/gb.db.mysql/.info @@ -51,6 +51,14 @@ Info m s [(Database)s] +Views +m +String[] +[(Database)s] +Triggers +m +String[] +[(Database)s] #_DataTypes CA @@ -288,6 +296,10 @@ Delete m (Table)s(Index)s[(Database)s] +PrimaryKey +m + +(Table)s(Columns)String[];[(Database)s] #_MySQL CA @@ -359,6 +371,10 @@ Users r String[] +Query +r +s + CBool m i @@ -390,6 +406,10 @@ Info m s (Routine)s[(Database)s] +Definition +m +s +(Routine)s[(Database)s] #_Table CA diff --git a/gb.db.mysql/src/gb.db.mysql/_DataBase.class b/gb.db.mysql/src/gb.db.mysql/_DataBase.class index c6d3881c9..a87e875ae 100644 --- a/gb.db.mysql/src/gb.db.mysql/_DataBase.class +++ b/gb.db.mysql/src/gb.db.mysql/_DataBase.class @@ -113,6 +113,19 @@ Public Function Triggers(Optional Database As String) As String[] End +Public Function Routines(Optional Database As String) As String[] + + Dim asRoutines As New String[] + + If Not Database Then Database = modMain.$Connection.Name + modMain.$hResult = modMain.$Connection.Exec("SELECT `name` FROM `mysql`.`proc` WHERE `db` = '" & Database & "'") + For Each modMain.$hResult + asRoutines.Add(modMain.$hResult!name) + Next + Return asRoutines + +End + Public Function Charset(Optional Database As String) As String If Not Database Then Database = modMain.$Connection.Name diff --git a/gb.db.mysql/src/gb.db.mysql/_MySQL.class b/gb.db.mysql/src/gb.db.mysql/_MySQL.class index 3ff959463..34d284bd3 100644 --- a/gb.db.mysql/src/gb.db.mysql/_MySQL.class +++ b/gb.db.mysql/src/gb.db.mysql/_MySQL.class @@ -238,7 +238,7 @@ End Public Procedure Use(Database As String) - modMain.$Connection.Exec("USE " & Database) + modMain.$Connection.Exec("USE `" & Database & "`") modMain.$Connection.Name = Database End