text stringlengths 0 234 |
|---|
raise ADO.Objects.NOT_FOUND; |
end if; |
end Load; |
procedure Save (Object : in out Source_Impl; |
Session : in out ADO.Sessions.Master_Session'Class) is |
Stmt : ADO.Statements.Update_Statement |
:= Session.Create_Statement (SOURCE_DEF'Access); |
begin |
if Object.Is_Modified (1) then |
Stmt.Save_Field (Name => COL_0_2_NAME, -- id |
Value => Object.Get_Key); |
Object.Clear_Modified (1); |
end if; |
if Object.Is_Modified (2) then |
Stmt.Save_Field (Name => COL_1_2_NAME, -- name |
Value => Object.Name); |
Object.Clear_Modified (2); |
end if; |
if Object.Is_Modified (3) then |
Stmt.Save_Field (Name => COL_2_2_NAME, -- label |
Value => Object.Label); |
Object.Clear_Modified (3); |
end if; |
if Object.Is_Modified (5) then |
Stmt.Save_Field (Name => COL_4_2_NAME, -- host_id |
Value => Object.Host); |
Object.Clear_Modified (5); |
end if; |
if Stmt.Has_Save_Fields then |
Object.Version := Object.Version + 1; |
Stmt.Save_Field (Name => "version", |
Value => Object.Version); |
Stmt.Set_Filter (Filter => "id = ? and version = ?"); |
Stmt.Add_Param (Value => Object.Get_Key); |
Stmt.Add_Param (Value => Object.Version - 1); |
declare |
Result : Integer; |
begin |
Stmt.Execute (Result); |
if Result /= 1 then |
if Result /= 0 then |
raise ADO.Objects.UPDATE_ERROR; |
else |
raise ADO.Objects.LAZY_LOCK; |
end if; |
end if; |
Function Definition: procedure List (Object : in out Source_Vector; |
Function Body: Session : in out ADO.Sessions.Session'Class; |
Query : in ADO.SQL.Query'Class) is |
Stmt : ADO.Statements.Query_Statement |
:= Session.Create_Statement (Query, SOURCE_DEF'Access); |
begin |
Stmt.Execute; |
Source_Vectors.Clear (Object); |
while Stmt.Has_Elements loop |
declare |
Item : Source_Ref; |
Impl : constant Source_Access := new Source_Impl; |
begin |
Impl.Load (Stmt, Session); |
ADO.Objects.Set_Object (Item, Impl.all'Access); |
Object.Append (Item); |
Function Definition: procedure Set_Field_Enum is |
Function Body: new ADO.Objects.Set_Field_Operation (Format_Type); |
Impl : Series_Access; |
begin |
Set_Field (Object, Impl); |
Set_Field_Enum (Impl.all, 8, Impl.Format, Value); |
end Set_Format; |
function Get_Format (Object : in Series_Ref) |
return Hyperion.Monitoring.Models.Format_Type is |
Impl : constant Series_Access |
:= Series_Impl (Object.Get_Load_Object.all)'Access; |
begin |
return Impl.Format; |
end Get_Format; |
procedure Set_Source (Object : in out Series_Ref; |
Value : in Hyperion.Monitoring.Models.Source_Ref'Class) is |
Impl : Series_Access; |
begin |
Set_Field (Object, Impl); |
ADO.Objects.Set_Field_Object (Impl.all, 9, Impl.Source, Value); |
end Set_Source; |
function Get_Source (Object : in Series_Ref) |
return Hyperion.Monitoring.Models.Source_Ref'Class is |
Impl : constant Series_Access |
:= Series_Impl (Object.Get_Load_Object.all)'Access; |
begin |
return Impl.Source; |
end Get_Source; |
procedure Set_Snapshot (Object : in out Series_Ref; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.