Public Member Functions | |
| MySQLManager (string hostname, string database, string username, string password, string cpooling, string port) | |
| Initialises and creates a new MySQL connection and maintains it. | |
| MySQLManager (String connect) | |
| Initialises and creates a new MySQL connection and maintains it. | |
| void | Initialise (String connect) |
| Initialises and creates a new MySQL connection and maintains it. | |
| void | CheckConnection () |
| Should be called before any db operation. This checks to see if the connection has not timed out. | |
| void | Close () |
| Shuts down the database connection. | |
| void | Reconnect () |
| Reconnects to the database. | |
| string | getVersion () |
| Returns the version of this DB provider. | |
| void | ExecuteResourceSql (string name) |
| Execute a SQL statement stored in a resource, as a string. | |
| void | ExecuteSql (string sql) |
| Execute a MySqlCommand. | |
| void | ExecuteParameterizedSql (string sql, Dictionary< string, string > parameters) |
| void | GetTableVersion (Dictionary< string, string > tableList) |
| Given a list of tables, return the version of the tables, as seen in the database. | |
| IDbCommand | Query (string sql, Dictionary< string, string > parameters) |
| Runs a query with protection against SQL Injection by using parameterised input. | |
| RegionProfileData | readSimRow (IDataReader reader) |
| Reads a region row from a database reader. | |
| ReservationData | readReservationRow (IDataReader reader) |
| Reads a reservation row from a database reader. | |
| UserAgentData | readAgentRow (IDataReader reader) |
| Reads an agent row from a database reader. | |
| UserProfileData | readUserRow (IDataReader reader) |
| Reads a user profile from an active data reader. | |
| AvatarAppearance | readAppearanceRow (IDataReader reader) |
| Reads an avatar appearence from an active data reader. | |
| Hashtable | readAttachments (IDataReader r) |
| bool | insertLogRow (string serverDaemon, string target, string methodCall, string arguments, int priority, string logMessage) |
| Inserts a new row into the log database. | |
| bool | insertUserRow (UUID uuid, string username, string lastname, string email, string passwordHash, string passwordSalt, UInt64 homeRegion, UUID homeRegionID, float homeLocX, float homeLocY, float homeLocZ, float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, string aboutText, string firstText, UUID profileImage, UUID firstImage, UUID webLoginKey, int userFlags, int godLevel, string customType, UUID partner) |
| Creates a new user and inserts it into the database. | |
| bool | updateUserRow (UUID uuid, string username, string lastname, string email, string passwordHash, string passwordSalt, UInt64 homeRegion, UUID homeRegionID, float homeLocX, float homeLocY, float homeLocZ, float homeLookAtX, float homeLookAtY, float homeLookAtZ, int created, int lastlogin, string inventoryURI, string assetURI, uint canDoMask, uint wantDoMask, string aboutText, string firstText, UUID profileImage, UUID firstImage, UUID webLoginKey, int userFlags, int godLevel, string customType, UUID partner) |
| Update user data into the database where User ID = uuid. | |
| bool | insertRegion (RegionProfileData regiondata) |
| Inserts a new region into the database. | |
| bool | deleteRegion (string uuid) |
| Delete a region from the database. | |
| bool | insertAgentRow (UserAgentData agentdata) |
| Creates a new agent and inserts it into the database. | |
| bool | insertAppearanceRow (AvatarAppearance appearance) |
| Create (or replace if existing) an avatar appearence. | |
| void | writeAttachments (UUID agentID, Hashtable data) |
Protected Member Functions | |
| void | GetWaitTimeout () |
| Get the wait_timeout value for our connection. | |
Properties | |
| MySqlConnection | Connection [get] |
| Get the connection being used. | |
| OpenSim::Data::MySQL::MySQLManager::MySQLManager | ( | string | hostname, | |
| string | database, | |||
| string | username, | |||
| string | password, | |||
| string | cpooling, | |||
| string | port | |||
| ) | [inline] |
Initialises and creates a new MySQL connection and maintains it.
| hostname | The MySQL server being connected to | |
| database | The name of the MySQL database being used | |
| username | The username logging into the database | |
| password | The password for the user logging in | |
| cpooling | Whether to use connection pooling or not, can be one of the following: 'yes', 'true', 'no' or 'false', if unsure use 'false'. | |
| port | The MySQL server port |
| OpenSim::Data::MySQL::MySQLManager::MySQLManager | ( | String | connect | ) | [inline] |
Initialises and creates a new MySQL connection and maintains it.
| connect | connectionString |
| void OpenSim::Data::MySQL::MySQLManager::Initialise | ( | String | connect | ) | [inline] |
Initialises and creates a new MySQL connection and maintains it.
| connect | connectionString |
| void OpenSim::Data::MySQL::MySQLManager::GetWaitTimeout | ( | ) | [inline, protected] |
Get the wait_timeout value for our connection.
| void OpenSim::Data::MySQL::MySQLManager::CheckConnection | ( | ) | [inline] |
Should be called before any db operation. This checks to see if the connection has not timed out.
| void OpenSim::Data::MySQL::MySQLManager::Close | ( | ) | [inline] |
Shuts down the database connection.
| void OpenSim::Data::MySQL::MySQLManager::Reconnect | ( | ) | [inline] |
Reconnects to the database.
| string OpenSim::Data::MySQL::MySQLManager::getVersion | ( | ) | [inline] |
Returns the version of this DB provider.
| void OpenSim::Data::MySQL::MySQLManager::ExecuteResourceSql | ( | string | name | ) | [inline] |
Execute a SQL statement stored in a resource, as a string.
| name | name of embedded resource |
| void OpenSim::Data::MySQL::MySQLManager::ExecuteSql | ( | string | sql | ) | [inline] |
Execute a MySqlCommand.
| sql | sql string to execute |
| void OpenSim::Data::MySQL::MySQLManager::ExecuteParameterizedSql | ( | string | sql, | |
| Dictionary< string, string > | parameters | |||
| ) | [inline] |
| void OpenSim::Data::MySQL::MySQLManager::GetTableVersion | ( | Dictionary< string, string > | tableList | ) | [inline] |
Given a list of tables, return the version of the tables, as seen in the database.
| tableList |
| IDbCommand OpenSim::Data::MySQL::MySQLManager::Query | ( | string | sql, | |
| Dictionary< string, string > | parameters | |||
| ) | [inline] |
Runs a query with protection against SQL Injection by using parameterised input.
| sql | The SQL string - replace any variables such as WHERE x = "y" with WHERE x = | |
| parameters | The parameters - index so that is indexed as 'y' |
| RegionProfileData OpenSim::Data::MySQL::MySQLManager::readSimRow | ( | IDataReader | reader | ) | [inline] |
Reads a region row from a database reader.
| reader | An active database reader |
| ReservationData OpenSim::Data::MySQL::MySQLManager::readReservationRow | ( | IDataReader | reader | ) | [inline] |
Reads a reservation row from a database reader.
| reader | An active database reader |
| UserAgentData OpenSim::Data::MySQL::MySQLManager::readAgentRow | ( | IDataReader | reader | ) | [inline] |
Reads an agent row from a database reader.
| reader | An active database reader |
| UserProfileData OpenSim::Data::MySQL::MySQLManager::readUserRow | ( | IDataReader | reader | ) | [inline] |
Reads a user profile from an active data reader.
| reader | An active database reader |
| AvatarAppearance OpenSim::Data::MySQL::MySQLManager::readAppearanceRow | ( | IDataReader | reader | ) | [inline] |
Reads an avatar appearence from an active data reader.
| reader | An active database reader |
| Hashtable OpenSim::Data::MySQL::MySQLManager::readAttachments | ( | IDataReader | r | ) | [inline] |
| bool OpenSim::Data::MySQL::MySQLManager::insertLogRow | ( | string | serverDaemon, | |
| string | target, | |||
| string | methodCall, | |||
| string | arguments, | |||
| int | priority, | |||
| string | logMessage | |||
| ) | [inline] |
Inserts a new row into the log database.
| serverDaemon | The daemon which triggered this event | |
| target | Who were we operating on when this occured (region UUID, user UUID, etc) | |
| methodCall | The method call where the problem occured | |
| arguments | The arguments passed to the method | |
| priority | How critical is this? | |
| logMessage | Extra message info |
| bool OpenSim::Data::MySQL::MySQLManager::insertUserRow | ( | UUID | uuid, | |
| string | username, | |||
| string | lastname, | |||
| string | email, | |||
| string | passwordHash, | |||
| string | passwordSalt, | |||
| UInt64 | homeRegion, | |||
| UUID | homeRegionID, | |||
| float | homeLocX, | |||
| float | homeLocY, | |||
| float | homeLocZ, | |||
| float | homeLookAtX, | |||
| float | homeLookAtY, | |||
| float | homeLookAtZ, | |||
| int | created, | |||
| int | lastlogin, | |||
| string | inventoryURI, | |||
| string | assetURI, | |||
| uint | canDoMask, | |||
| uint | wantDoMask, | |||
| string | aboutText, | |||
| string | firstText, | |||
| UUID | profileImage, | |||
| UUID | firstImage, | |||
| UUID | webLoginKey, | |||
| int | userFlags, | |||
| int | godLevel, | |||
| string | customType, | |||
| UUID | partner | |||
| ) | [inline] |
Creates a new user and inserts it into the database.
| uuid | User ID | |
| username | First part of the login | |
| lastname | Second part of the login | |
| passwordHash | A salted hash of the users password | |
| passwordSalt | The salt used for the password hash | |
| homeRegion | A regionHandle of the users home region | |
| homeRegionID | The UUID of the user's home region | |
| homeLocX | Home region position vector | |
| homeLocY | Home region position vector | |
| homeLocZ | Home region position vector | |
| homeLookAtX | Home region 'look at' vector | |
| homeLookAtY | Home region 'look at' vector | |
| homeLookAtZ | Home region 'look at' vector | |
| created | Account created (unix timestamp) | |
| lastlogin | Last login (unix timestamp) | |
| inventoryURI | Users inventory URI | |
| assetURI | Users asset URI | |
| canDoMask | I can do mask | |
| wantDoMask | I want to do mask | |
| aboutText | Profile text | |
| firstText | Firstlife text | |
| profileImage | UUID for profile image | |
| firstImage | UUID for firstlife image | |
| webLoginKey | Ignored |
| bool OpenSim::Data::MySQL::MySQLManager::updateUserRow | ( | UUID | uuid, | |
| string | username, | |||
| string | lastname, | |||
| string | email, | |||
| string | passwordHash, | |||
| string | passwordSalt, | |||
| UInt64 | homeRegion, | |||
| UUID | homeRegionID, | |||
| float | homeLocX, | |||
| float | homeLocY, | |||
| float | homeLocZ, | |||
| float | homeLookAtX, | |||
| float | homeLookAtY, | |||
| float | homeLookAtZ, | |||
| int | created, | |||
| int | lastlogin, | |||
| string | inventoryURI, | |||
| string | assetURI, | |||
| uint | canDoMask, | |||
| uint | wantDoMask, | |||
| string | aboutText, | |||
| string | firstText, | |||
| UUID | profileImage, | |||
| UUID | firstImage, | |||
| UUID | webLoginKey, | |||
| int | userFlags, | |||
| int | godLevel, | |||
| string | customType, | |||
| UUID | partner | |||
| ) | [inline] |
Update user data into the database where User ID = uuid.
| uuid | User ID | |
| username | First part of the login | |
| lastname | Second part of the login | |
| passwordHash | A salted hash of the users password | |
| passwordSalt | The salt used for the password hash | |
| homeRegion | A regionHandle of the users home region | |
| homeLocX | Home region position vector | |
| homeLocY | Home region position vector | |
| homeLocZ | Home region position vector | |
| homeLookAtX | Home region 'look at' vector | |
| homeLookAtY | Home region 'look at' vector | |
| homeLookAtZ | Home region 'look at' vector | |
| created | Account created (unix timestamp) | |
| lastlogin | Last login (unix timestamp) | |
| inventoryURI | Users inventory URI | |
| assetURI | Users asset URI | |
| canDoMask | I can do mask | |
| wantDoMask | I want to do mask | |
| aboutText | Profile text | |
| firstText | Firstlife text | |
| profileImage | UUID for profile image | |
| firstImage | UUID for firstlife image | |
| webLoginKey | UUID for weblogin Key |
| bool OpenSim::Data::MySQL::MySQLManager::insertRegion | ( | RegionProfileData | regiondata | ) | [inline] |
Inserts a new region into the database.
| regiondata | The region to insert |
| bool OpenSim::Data::MySQL::MySQLManager::deleteRegion | ( | string | uuid | ) | [inline] |
Delete a region from the database.
| uuid | The region to delete |
| bool OpenSim::Data::MySQL::MySQLManager::insertAgentRow | ( | UserAgentData | agentdata | ) | [inline] |
Creates a new agent and inserts it into the database.
| agentdata | The agent data to be inserted |
| bool OpenSim::Data::MySQL::MySQLManager::insertAppearanceRow | ( | AvatarAppearance | appearance | ) | [inline] |
Create (or replace if existing) an avatar appearence.
| appearance |
| void OpenSim::Data::MySQL::MySQLManager::writeAttachments | ( | UUID | agentID, | |
| Hashtable | data | |||
| ) | [inline] |
MySqlConnection OpenSim::Data::MySQL::MySQLManager::Connection [get] |
Get the connection being used.
1.5.1