| Package | com.maclema.mysql |
| Class | public class Connection |
| Inheritance | Connection flash.events.EventDispatcher |
| Property | Defined By | ||
|---|---|---|---|
| busy : Boolean [read-only]
Returns true if the connection is currently executing a query
| Connection | ||
| connected : Boolean [read-only]
Returns true or false indicating if this Connection instance is connected to MySql
| Connection | ||
| lastQueryStart : Number [read-only]
Returns the time the last query was executed
| Connection | ||
| poolSize : int [read-only]
Returns the current size of the command pool
| Connection | ||
| totalTX : Number [read-only]
Returns the number of bytes recieved since the connection was opened
| Connection | ||
| tx : Number [read-only]
Returns the number of bytes recieved since the last query
| Connection | ||
| Method | Defined By | ||
|---|---|---|---|
Connection(host:String, port:int, username:String, password:String = null, database:String = null)
Creates a new Connection instance. | Connection | ||
changeDatabaseTo(whatDb:String):MySqlToken
Changes the currently selected database database
| Connection | ||
connect(charSet:String = utf8):void
Opens the socket connection to the server. | Connection | ||
Creates a new statement object
| Connection | ||
disconnect():void
Disconnects the socket from the server. | Connection | ||
getServerInformation():ServerInformation
Returns the server information object for this connection
| Connection | ||
| Event | Summary | Defined By | ||
|---|---|---|---|---|
| Dispatched when the connection to the server is terminated. | Connection | |||
| Dispatched when successfully connected to the MySql Server | Connection | |||
| Dispatched when a socket error occurs. | Connection | |||
| Dispatch when an SQL error occurs on connecting to MySql | Connection | |||
| busy | property |
busy:Boolean [read-only] Returns true if the connection is currently executing a query
This property can be used as the source for data binding.
public function get busy():Boolean| connected | property |
connected:Boolean [read-only] Returns true or false indicating if this Connection instance is connected to MySql
This property can be used as the source for data binding.
public function get connected():Boolean| lastQueryStart | property |
lastQueryStart:Number [read-only] Returns the time the last query was executed
public function get lastQueryStart():Number| poolSize | property |
poolSize:int [read-only] Returns the current size of the command pool
public function get poolSize():int| totalTX | property |
totalTX:Number [read-only] Returns the number of bytes recieved since the connection was opened
public function get totalTX():Number| tx | property |
tx:Number [read-only] Returns the number of bytes recieved since the last query
public function get tx():Number| Connection | () | Constructor |
public function Connection(host:String, port:int, username:String, password:String = null, database:String = null)Creates a new Connection instance.
Parametershost:String | |
port:int | |
username:String | |
password:String (default = null) | |
database:String (default = null) |
| changeDatabaseTo | () | method |
public function changeDatabaseTo(whatDb:String):MySqlTokenChanges the currently selected database database
Parameters
whatDb:String |
MySqlToken |
| connect | () | method |
public function connect(charSet:String = utf8):voidOpens the socket connection to the server. You can optionally specify a character set. The specified charset should match a charset found in INFORMATION_SCHEMA.CHARACTER_SETS of the MySql database you are connecting to. It will then be converted to a compatible actionscript character set name and used for the duration of the connection. The default character set if utf8;
Parameters
charSet:String (default = utf8) |
| createStatement | () | method |
| disconnect | () | method |
public function disconnect():voidDisconnects the socket from the server.
| getServerInformation | () | method |
public function getServerInformation():ServerInformationReturns the server information object for this connection
ReturnsServerInformation |
| close | Event |
flash.events.EventDispatched when the connection to the server is terminated.
| connect | Event |
flash.events.EventDispatched when successfully connected to the MySql Server
| ioError | Event |
flash.events.IOErrorEventDispatched when a socket error occurs.
| sqlError | Event |
com.maclema.mysql.events.MySqlErrorEventDispatch when an SQL error occurs on connecting to MySql