Class msql.Msql
All Packages Class Hierarchy This Package Previous Next Index
Class msql.Msql
java.lang.Object
|
+----msql.Msql
- public class Msql
- extends Object
Msql Class - implements a connection to a remote server
and a JAVA variant of the Msql API as defined by David Hughes
-
CHAR
-
-
INT
-
-
REAL
-
-
Msql()
- Constructor
-
Msql(String)
- Msql Constructor - establishes connection to named host
-
_ListFields(String)
- List Fields in a given table.
-
Close()
- Close - close the connection to the server.
-
Connect(String)
- Connect - establishes connection to named host
-
Connect(String, int)
- Connect - connect using a specified port
-
Connect(String, String)
- Connect - establishes connection to named host
-
Connect(String, String, int)
- Connect - connect using a specified port
-
CreateDB(String)
- Create a new database.
-
DropDB(String)
- Drop a database.
-
ListDBs()
- List Databases available on server.
-
ListFields(String)
- List Fields in a given table.
-
ListTables()
- List tables in the selected database.
-
Query(String)
- Send an SQL Query to the server.
-
ReloadACL(String)
- Reload access control list.
-
SelectDB(String)
- SelectDB - Select the database to work with
-
Shutdown()
- Shutdown server.
INT
public final static int INT
CHAR
public final static int CHAR
REAL
public final static int REAL
Msql
public Msql()
- Constructor
Msql
public Msql(String msqlServer) throws MsqlException
- Msql Constructor - establishes connection to named host
- Parameters:
- msqlServer - the name of the msql server.
Connect
public synchronized void Connect(String msqlServer,
String userName) throws MsqlException
- Connect - establishes connection to named host
- Parameters:
- msqlServer - the name of the msql server.
- userName - user name the applet will assume.
- Throws: MsqlException
- 1. Open socket.
2. Establish IO Streams on socket.
3. Obtain version info.
4. Supply user name.
5. Retrieve status.
Connect
public void Connect(String msqlServer,
String userName,
int tcpPort) throws MsqlException
- Connect - connect using a specified port
- Parameters:
- msqlServer - the name of the msql server.
- userName - user name the applet will assume.
- tcpPort - port for msql connections
- Throws: MsqlException
- as above.
Connect
public void Connect(String msqlServer) throws MsqlException
- Connect - establishes connection to named host
- Parameters:
- msqlServer - the name of the msql server.
- Throws: MsqlException
- as above.
Connect
public void Connect(String msqlServer,
int tcpPort) throws MsqlException
- Connect - connect using a specified port
- Parameters:
- msqlServer - the name of the msql server.
- tcpPort - port for msql connections
- Throws: MsqlException
- as above.
Close
public synchronized void Close() throws MsqlException
- Close - close the connection to the server.
SelectDB
public synchronized void SelectDB(String db) throws MsqlException
- SelectDB - Select the database to work with
- Parameters:
- db - the name of the database to select.
- Throws: MsqlException
- if select fails.
Query
public synchronized MsqlResult Query(String s) throws MsqlException
- Send an SQL Query to the server.
- Parameters:
- s - the Query string.
- Returns:
- null when used with INSERT/UPDATE or similar queries which do not return data
- Throws: MsqlException
- when query or communication fails.
ListDBs
public synchronized String[] ListDBs() throws MsqlException
- List Databases available on server.
- Returns:
- array of String cointaining names of databases.
- Throws: MsqlException
- if ListDB or communication fails.
ListTables
public synchronized String[] ListTables() throws MsqlException
- List tables in the selected database.
- Returns:
- array of String conttaining names of tables.
- Throws: MsqlException
- if ListTables or communication fails.
_ListFields
public synchronized MsqlData _ListFields(String s) throws MsqlException
- List Fields in a given table.
- Parameters:
- s - name of the table for which information requested.
- Returns:
- MsqlData structure containing field information.
- Throws: MsqlException
- if ListTables or communication fails.
ListFields
public synchronized MsqlFieldDesc[] ListFields(String s) throws MsqlException
- List Fields in a given table.
- Parameters:
- s - name of the table for which information requested.
- Returns:
- array of MsqlFieldDesc containing field information.
- Throws: MsqlException
- if ListTables or communication fails.
CreateDB
public synchronized void CreateDB(String s) throws MsqlException
- Create a new database. Included for completeness only since
command can only be executed if issued from UNIX domain socket.
DropDB
public synchronized void DropDB(String s) throws MsqlException
- Drop a database. Included for completeness only since
command can only be executed if issued from UNIX domain socket.
ReloadACL
public synchronized void ReloadACL(String s) throws MsqlException
- Reload access control list. Included for completeness only since
command can only be executed if issued from UNIX domain socket.
Shutdown
public synchronized void Shutdown() throws MsqlException
- Shutdown server. Included for completeness only since
command can only be executed if issued from UNIX domain socket.
All Packages Class Hierarchy This Package Previous Next Index