[GB.DB.MYSQL]

* BUG: Fixed a bug in the _MySQL.Use procedure.
* NEW: Added Routines procedure to Database class.

git-svn-id: svn://localhost/gambas/trunk@1552 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
David Villalobos Cambronero 2008-09-11 20:16:47 +00:00
parent 7f12844128
commit f7db72be7f
3 changed files with 34 additions and 1 deletions

View file

@ -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

View file

@ -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

View file

@ -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