Packagecom.maclema.mysql
Classpublic class Connection
InheritanceConnection Inheritance flash.events.EventDispatcher



Public Methods
 MethodDefined by
  
Connection(host:String, port:int, user:String, scrambler:MysqlScrambler, database:String = null)
Creates a new Connection object.

scrambler: Since many developers will not want to store the database password in the compiled swf a scrambler can provide a route to send the scramble to a server to be encrypted and then passed back to flex.
Connection
  
connect():void
Connects to the database server
Connection
  
Creates a new statement object
Connection
  
disconnect():void
Disconnects from the database server
Connection
  
executeQuery(statement:Statement, sql:String):void
Used by Statement to execute a query or update sql statement.
Connection
Constructor detail
Connection()constructor
public function Connection(host:String, port:int, user:String, scrambler:MysqlScrambler, database:String = null)

Creates a new Connection object.

scrambler: Since many developers will not want to store the database password in the compiled swf a scrambler can provide a route to send the scramble to a server to be encrypted and then passed back to flex. If you wish to store the password within the app, or the user is inputing the password you may use the PlainTextScrambler provided.

Parameters
host:String
 
port:int
 
user:String
 
scrambler:MysqlScrambler
 
database:String (default = null)
Method detail
connect()method
public function connect():void

Connects to the database server

createStatement()method 
public function createStatement():Statement

Creates a new statement object

Returns
Statement
disconnect()method 
public function disconnect():void

Disconnects from the database server

executeQuery()method 
public function executeQuery(statement:Statement, sql:String):void

Used by Statement to execute a query or update sql statement. Should never be called directly.

Parameters
statement:Statement
 
sql:String