aonestar
.public
Tables
(current)
Columns
Constraints
Relationships
Orphan Tables
Anomalies
Routines
sp_get_keycard_issue_logs_json
Parameters
Name
Type
Mode
register_id
integer
IN (DEFAULT NULL)
booking_id
integer
IN (DEFAULT NULL)
Definition
declare default_issue_qty int; result_json json; configs jsonb; v_room_id int; begin select jsonb_agg(row_to_json(l.*)) into result_json from intf_keycard_logs l where ( (l.register_id is not null and (/*$1 is null or */l.register_id = $1)) or (l.booking_id is not null and (/*$2 is null or */ l.booking_id = $2)) ) ; return result_json; end;