-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathgapi_cal_event.pks
110 lines (91 loc) · 3.49 KB
/
gapi_cal_event.pks
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/*******************************************************************
Copyright (C) Trent Schafer 2014
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*******************************************************************/
create or replace
package gapi_cal_event
as
type t_event is record (
kind varchar2(20) := 'calendar#event'
, id varchar2(300)
, status varchar2(50)
, html_link varchar2(500)
, created timestamp with time zone
, updated timestamp with time zone
, summary varchar2(4000)
, description varchar2(4000)
, location varchar2(200)
, color_id varchar2(10)
, start_date timestamp with time zone
, end_date timestamp with time zone
, all_day BOOLEAN default FALSE
);
type t_event_sql is record (
kind varchar2(20) := 'calendar#event'
, id varchar2(300)
, status varchar2(50)
, html_link varchar2(500)
, created timestamp with time zone
, updated timestamp with time zone
, summary varchar2(4000)
, description varchar2(4000)
, location varchar2(200)
, color_id varchar2(10)
, start_date timestamp with time zone
, end_date timestamp with time zone
, all_day GAPI.SQL_BOOL default GAPI.GC_FALSE
);
type t_event_list is table of t_event index by PLS_INTEGER;
type t_event_list_sql is table of t_event_sql;
function insert_event(
p_calendar_id in varchar2
, p_title in varchar2
, p_start_date in timestamp with time zone
, p_end_date in timestamp with time zone
, p_all_day in BOOLEAN default FALSE
, p_location in varchar2 default NULL
, p_description in varchar2 default NULL
, p_access_token in varchar2
) return varchar2;
procedure update_event(
p_calendar_id in varchar2
, p_event_id in varchar2
, p_title in varchar2
, p_start_date in timestamp with time zone
, p_end_date in timestamp with time zone
, p_all_day in BOOLEAN default FALSE
, p_location in varchar2 default NULL
, p_description in varchar2 default NULL
, p_access_token in varchar2
);
procedure delete_event(
p_calendar_id in varchar2
, p_event_id in varchar2
, p_access_token in varchar2);
function get_event(
p_calendar_id in varchar2
, p_event_id in varchar2
, p_access_token in varchar2) return t_event;
function list_events(
p_calendar_id in varchar2
, p_max_results in NUMBER default 250
, p_query in varchar2
, p_access_token in varchar2
) return t_event_list;
function list_events_sql(
p_calendar_id in varchar2
, p_max_results in NUMBER default 250
, p_query in varchar2
, p_access_token in varchar2) return t_event_list_sql pipelined;
end gapi_cal_event;
/