Ejemplo n.º 1
0
int TranslationUpdateQuery::bind()
{
    int err = bindPrimaryKey();
    if ( !err ) err = bindInt64( ":sid", m_record.sid );
    if ( !err ) err = bindString( ":text", m_record.text );
    if ( !err ) err = bindInt( ":fmark", m_record.fmark );
    if ( !err ) err = bindInt( ":rmark", m_record.rmark );
    return err;
}
Ejemplo n.º 2
0
void DbGpfsInfo::removeRows(SQLHSTMT sqlStmt,string& table)
{
    SQLRETURN ret;
    string deleteSql = dbif->genDelete(*primary_key,table);
    bindPrimaryKey(sqlStmt,deleteSql,polledInfo,false);
 
    ret = DbInterface::dbModule.SQLFreeStmt(sqlStmt,SQL_RESET_PARAMS);
    DbInterface::checkSqlRetcode("DbGpfsInfo::removeRows SQLFreeStmt",ret,sqlStmt,SQL_HANDLE_STMT);  
}
Ejemplo n.º 3
0
//=================================================================================================
InputManager::InputManager() : m_MouseSensivity(0.0f)
{
	// Initialisation
	DMemSet(m_aKeyBinds, 0, sizeof(m_aKeyBinds));

	// Paramètres par défaut
	bindPrimaryKey('Q', Left);
	bindPrimaryKey('Z', Up);
	bindPrimaryKey('D', Right);
	bindPrimaryKey('S', Down);
	bindPrimaryKey('A', LeanLeft);
	bindPrimaryKey('E', LeanRight);
	bindPrimaryKey(DInputManager::Key_Space, Jump);
	bindPrimaryKey(DInputManager::Key_LControl, Crouch);
	bindPrimaryKey(DInputManager::Key_Escape, Menu);
	bindSecondaryKey('C', Crouch);
	setMouseSensivity(0.003f);
}
Ejemplo n.º 4
0
void DbGpfsInfo::initTable(SQLHSTMT sqlStmt,string& table)
{
    SQLRETURN ret;
    vector<string> fields(primary_key->begin(),primary_key->end());
    fields.push_back(string("change"));
    fields.push_back(string("health"));
    string insertSql = dbif->genInsert(fields, table);

    bindPrimaryKey(sqlStmt,insertSql,polledInfo,true);
    
    ret = DbInterface::dbModule.SQLFreeStmt(sqlStmt,SQL_RESET_PARAMS); //reset bind parameters of statement handle
    DbInterface::checkSqlRetcode("DbGpfsInfo::fillTable SQLFreeStmt",ret,sqlStmt,SQL_HANDLE_STMT);

}
Ejemplo n.º 5
0
void DbGpfsInfo::queryTable(SQLHSTMT sqlStmt,string& table,T** holder)
{
    SQLRETURN ret;
    
    string querySql = dbif->genSelect(*primary_key,table);

    bindPrimaryKey(sqlStmt,querySql,polledInfo,false);
    
    ret = DbInterface::dbModule.SQLFreeStmt(sqlStmt,SQL_RESET_PARAMS);
    DbInterface::checkSqlRetcode("DbGpfsInfo::fillTempTable SQLFreeStmt",ret,sqlStmt,SQL_HANDLE_STMT);
    
    getResult(sqlStmt,holder);
    
    ret = DbInterface::dbModule.SQLFreeStmt(sqlStmt,SQL_CLOSE);
    DbInterface::checkSqlRetcode("DbGpfsInfo::queryTable SQLFreeStmt",ret,sqlStmt,SQL_HANDLE_STMT);


}
Ejemplo n.º 6
0
int WordByIdQuery::bind()
{
    return bindPrimaryKey();
}
Ejemplo n.º 7
0
int WordUpdateQuery::bind()
{
    int err = bindPrimaryKey();
    if ( !err ) err = bindString( ":text", m_record.text );
    return err;
}
Ejemplo n.º 8
0
int TranslationByIdQuery::bind()
{
    return bindPrimaryKey();
}