init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
Tools/CodeGeneration/Templates/Server/DataAccess/DataAccessor
|
@ -0,0 +1,47 @@
|
|||
//***************************************************************************//
|
||||
// Legenerálja a DA-hoz a zárolási műveletet. //
|
||||
// //
|
||||
// NINCS HASZNÁLVA! //
|
||||
//***************************************************************************//
|
||||
template GenerateWaitForLock(classname)
|
||||
#region Wait for lock
|
||||
[GenerateCommandGetterProperty("WaitForLock")]
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns>A műveletet elvégző SQL parancs.</returns>
|
||||
private [GetCSharpSQLCommandType()] [GenerateCommandCreatorName("WaitForLock")]()
|
||||
{
|
||||
[GetCSharpSQLCommandType()] result = new [GetCSharpSQLCommandType()]();
|
||||
result.CommandType = CommandType.Text;
|
||||
result.Parameters.Add("[ConvertNameToCommandParameterName("ID")]", [GetCSharpSQLIDType()]);
|
||||
result.Parameters.Add("[ConvertNameToCommandParameterName("TimeOut")]", [GetCSharpSQLIDType()]);// XXX nem hasznalt parameter!
|
||||
result.CommandText =
|
||||
"select " +
|
||||
"SERIAL " +
|
||||
"from " +
|
||||
"[ConvertNameToSQLTableName([classname])] " +
|
||||
"where " +
|
||||
"ID = :[ConvertNameToCommandParameterName("ID")] " +
|
||||
"for update";
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public void WaitForLock([classname] entity, int timeout)
|
||||
{
|
||||
[GetCSharpSQLCommandType()] command = this.[ConvertNameToCommandName("WaitForLock")];
|
||||
[GenerateCommandInit("command")]
|
||||
command.Parameters\["[ConvertNameToCommandParameterName("ID")]"\].Value = entity.ID;
|
||||
command.Parameters\["[ConvertNameToCommandParameterName("TimeOut")]"\].Value = timeout;
|
||||
|
||||
command.ExecuteNonQuery(); // XXX nincs rendesen kigyurva!
|
||||
}
|
||||
|
||||
#endregion
|
||||
end template
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue