dbo.QBM_FGIDBQueueCurrRestoreAble
Scalar FunctionSQL_SCALAR_FUNCTIONSandbox DB
Interpretation
- Database function. Usually supports views, validation, or calculated predicates; look at referenced-by entries for callers.
Relations
- No extracted relations.
Typed Edges
- references source dbo.QBM_FGIUTCDate source text reference
Complete Source
1CREATE FUNCTION dbo.QBM_FGIDBQueueCurrRestoreAble(2 @Generation int,3 @StartedAt datetime,4 @SecondsToAdd int5) RETURNS BIT6AS7BEGIN8 RETURN(CASE9 WHEN DATEADD(SS,(CASE10 WHEN @Generation <= 50 THEN11 0.1306 * @generation * @generation + 3.31 * @generation + 4.512 ELSE 50013 END + CASE14 WHEN @SecondsToAdd IS NULL THEN15 016 WHEN @SecondsToAdd < 0 THEN17 018 ELSE @SecondsToAdd19 END), @StartedAt) < dbo.QBM_FGIUTCDate() THEN20 121 ELSE 022 END)23END
Open raw exported source
1 create function dbo.QBM_FGIDBQueueCurrRestoreAble(@Generation int , @StartedAt datetime , @SecondsToAdd int ) returns bit as begin return2( case when DATEADD (SS , ( case when @Generation <= 50 then 0.1306 * @generation * @generation + 3.31 * @generation + 4.5 else 500 end + case when @SecondsToAdd3 is null then 0 when @SecondsToAdd < 0 then 0 else @SecondsToAdd end ) , @StartedAt ) < dbo.QBM_FGIUTCDate() then 1 else 0 end ) end 4