-
Notifications
You must be signed in to change notification settings - Fork 3
/
install.sql
50 lines (39 loc) · 1.06 KB
/
install.sql
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
rem
rem install package
rem
rem Usage
rem SQL > @install.sql <privileges> <environment>
rem
rem Options
rem
rem privileges - public - installs package and grants API to public
rem - peer - installs package and grants API to peers - use whitelist grants
rem
rem environment - development - more privileges required for development
rem - production - production ready
rem
set verify off
define l_privileges = "&1"
define l_environment = "&2"
undefine 1
undefine 2
rem Load package
@package.sql
rem init SQL*Plus settings
@sqlplus_init.sql
prompt Installing API specification
@module/api/package/plparse.pks
prompt Installing package Implementation
@module/implementation/install.sql
prompt Installing package API
@module/api/install.sql
prompt Installing package tests
@test/install_&&l_environment..sql
prompt Granting privileges on package API
@module/api/grant_&&l_privileges..sql
rem finalize SQL*Plus
@@sqlplus_finalize.sql
rem undefine locals
undefine l_privileges
rem undefine package globals
@undefine_globals.sql