public class PDO extends java.lang.Object implements EnvCleanup
Constructor and Description |
---|
PDO(Env env,
java.lang.String dsn,
java.lang.String user,
java.lang.String pass,
ArrayValue options) |
Modifier and Type | Method and Description |
---|---|
boolean |
beginTransaction()
Starts a transaction.
|
void |
cleanup()
Implements the EnvCleanup interface.
|
void |
close() |
boolean |
commit()
Commits a transaction.
|
java.lang.String |
errorCode() |
ArrayValue |
errorInfo() |
Value |
exec(Env env,
java.lang.String query)
Executes a statement, returning the number of rows.
|
Value |
getAttribute(Env env,
int attribute) |
static ArrayValue |
getAvailableDrivers() |
int |
getCase() |
protected int |
getColumnCase() |
protected JdbcConnectionResource |
getConnection() |
int |
getOracleNulls() |
protected boolean |
isConnected() |
java.lang.String |
lastInsertId(Env env,
Value nameV) |
Value |
prepare(Env env,
java.lang.String query,
ArrayValue driverOptions)
Prepares a statement for execution.
|
Value |
query(Env env,
java.lang.String query,
int mode,
Value[] args)
Queries the database
|
java.lang.String |
quote(java.lang.String query,
int parameterType)
Quotes the string
|
java.lang.String |
real_escape_string(java.lang.String str)
Escapes the string.
|
boolean |
rollBack(Env env)
Rolls a transaction back.
|
boolean |
setAttribute(Env env,
int attribute,
Value value) |
protected void |
setLastExecutedStatement(PDOStatement stmt) |
java.lang.String |
toString() |
public static final int ATTR_AUTOCOMMIT
public static final int ATTR_PREFETCH
public static final int ATTR_TIMEOUT
public static final int ATTR_ERRMODE
public static final int ATTR_SERVER_VERSION
public static final int ATTR_CLIENT_VERSION
public static final int ATTR_SERVER_INFO
public static final int ATTR_CONNECTION_STATUS
public static final int ATTR_CASE
public static final int ATTR_CURSOR_NAME
public static final int ATTR_CURSOR
public static final int ATTR_ORACLE_NULLS
public static final int ATTR_PERSISTENT
public static final int ATTR_STATEMENT_CLASS
public static final int ATTR_FETCH_TABLE_NAMES
public static final int ATTR_FETCH_CATALOG_NAMES
public static final int ATTR_DRIVER_NAME
public static final int ATTR_STRINGIFY_FETCHES
public static final int ATTR_MAX_COLUMN_LEN
public static final int ATTR_DEFAULT_FETCH_MODE
public static final int ATTR_EMULATE_PREPARES
public static final int MYSQL_ATTR_INIT_COMMAND
public static final int CASE_NATURAL
public static final int CASE_UPPER
public static final int CASE_LOWER
public static final int CURSOR_FWDONLY
public static final int CURSOR_SCROLL
public static final java.lang.String ERR_NONE
public static final int ERRMODE_SILENT
public static final int ERRMODE_WARNING
public static final int ERRMODE_EXCEPTION
public static final int FETCH_LAZY
public static final int FETCH_ASSOC
public static final int FETCH_NUM
public static final int FETCH_BOTH
public static final int FETCH_OBJ
public static final int FETCH_BOUND
public static final int FETCH_COLUMN
public static final int FETCH_CLASS
public static final int FETCH_INTO
public static final int FETCH_FUNC
public static final int FETCH_NAMED
public static final int FETCH_KEY_PAIR
public static final int FETCH_GROUP
public static final int FETCH_UNIQUE
public static final int FETCH_CLASSTYPE
public static final int FETCH_SERIALIZE
public static final int FETCH_ORI_NEXT
public static final int FETCH_ORI_PRIOR
public static final int FETCH_ORI_FIRST
public static final int FETCH_ORI_LAST
public static final int FETCH_ORI_ABS
public static final int FETCH_ORI_REL
public static final int FETCH_PROPS_LATE
public static final int MYSQL_ATTR_USE_BUFFERED_QUERY
public static final int NULL_NATURAL
public static final int NULL_EMPTY_STRING
public static final int NULL_TO_STRING
public static final int PARAM_NULL
public static final int PARAM_INT
public static final int PARAM_STR
public static final int PARAM_LOB
public static final int PARAM_STMT
public static final int PARAM_BOOL
public static final int PARAM_EVT_ALLOC
public static final int PARAM_EVT_EXEC_POST
public static final int PARAM_EVT_EXEC_PRE
public static final int PARAM_EVT_FETCH_POST
public static final int PARAM_EVT_FETCH_PRE
public static final int PARAM_EVT_FREE
public static final int PARAM_EVT_NORMALIZE
public static final int PARAM_INPUT_OUTPUT
public PDO(Env env, java.lang.String dsn, java.lang.String user, java.lang.String pass, ArrayValue options)
protected JdbcConnectionResource getConnection()
protected boolean isConnected()
protected void setLastExecutedStatement(PDOStatement stmt)
public boolean beginTransaction()
public boolean commit()
public void close()
public void cleanup()
cleanup
in interface EnvCleanup
public java.lang.String errorCode()
public ArrayValue errorInfo()
protected int getColumnCase()
public Value exec(Env env, java.lang.String query)
public static ArrayValue getAvailableDrivers()
public int getCase()
public int getOracleNulls()
public Value prepare(Env env, java.lang.String query, ArrayValue driverOptions)
public Value query(Env env, java.lang.String query, int mode, Value[] args)
public java.lang.String quote(java.lang.String query, int parameterType)
public java.lang.String real_escape_string(java.lang.String str)
public boolean rollBack(Env env)
public java.lang.String toString()
toString
in class java.lang.Object