Installation:
- Atom 1.13 (out of the box with out of the box theme One Dark)
- Packages: language-oracle 1.6.1, qcolor 0.4.1
Places to think about are marked in comments with: ???
Snippet one (package):
CREATE OR REPLACE PACKAGE XYZ AUTHID DEFINER AS -- AUTID DEFINER ???
k1 CONSTANT INTERVAL DAY(0) TO SECOND(0) := TO_DSINTERVAL('0 00:01:00'); -- DAY SECOND ???
PROCEDURE A1;
END XYZ;
/
CREATE OR REPLACE PACKAGE BODY XYZ AS
g1 VARCHAR2(61);
PROCEDURE A1 IS
lDate DATE;
BEGIN
SELECT SYSDATE INTO lDate FROM DUAL;
SELECT abc INTO lAbc FROM ABC WHERE DEF = 1 AND (GHI < 5 OR GHI > 10); -- AND, OR ???
END A1; -- A1 ???
BEGIN
g1 := SYS.ANYDATA.ConvertObject(CType()).GETTYPENAME(); -- SYS... ???
END XYZ;
/
Snippet two (type):
CREATE OR REPLACE TYPE C1 AS OBJECT -- OBJECT ???
(
PId NUMBER(9,0),
CId NUMBER(9,0),
CONSTRUCTOR FUNCTION C1 RETURN SELF AS RESULT -- SELF RESULT ???
)
/
CREATE OR REPLACE TYPE BODY C1 IS
CONSTRUCTOR FUNCTION C1 RETURN SELF AS RESULT IS
BEGIN
SELF.PId := NULL;
SELF.CId := NULL;
RETURN;
END C1; -- C1 ???
END;
/
DDL snippets:
WHENEVER OSERROR EXIT FAILURE ROLLBACK -- WHENEVER OSERROR FAILURE ???
WHENEVER SQLERROR EXIT FAILURE ROLLBACK -- SQLERROR ???
SET TIMING ON
SET ECHO OFF
SET LINESIZE 300
SET SERVEROUTPUT ON
SET TERMOUT OFF
PROMPT Changeset 0.0.1 -- PROMPT ???
ACCEPT gN1 CHAR PROMPT ': ' -- ACCEPT ???
COLUMN ProtokollDate FORMAT A15 Old_Value ProtokollDate -- FORMAT ???
SELECT TO_CHAR(SYSDATE,'YYYYMMDD_HH24MISS') ProtokollDate FROM DUAL;
SET TERMOUT ON
SPOOL A1_&ProtokollDate..log -- SPOOL ???
ALTER TABLE OWNER.TAB1 SHRINK SPACE CASCADE; -- SHRINK ... ???
ALTER TABLE OWNER.TAB1 MODIFY PARTITION TAB1_P01 SHRINK SPACE; -- MODIFY ... ???
ALTER TABLE OWNER.TAB2 ENABLE ROW MOVEMENT; -- ENABLE ... ???
ALTER TABLE OWNER.TAB2 DISABLE ROW MOVEMENT; -- DISABLE ... ???
ALTER TABLE OWNER.TAB3 ADD CONSTRAINT PK_TAB3 PRIMARY KEY (C1); -- ADD ???
DEFINE T1 = &1 -- DEFINE ???
CONNECT user1@db1 -- CONNECT ???
VAR TSystemProviderId NUMBER -- VAR ???
CREATE TABLE TAB4 (
ID1 NUMBER(9, 0) NOT NULL, -- NOT ???
DATETIME DATE NOT NULL,
DAY DATE NOT NULL,
UUID VARCHAR2(36 BYTE) NOT NULL, -- BYTE ???
CONSTRAINT PRIMARY KEY (ID1)
USING INDEX ( -- INDEX ???
CREATE INDEX IXPK_TAB4 ON TAB4 (ID1)
COMPRESS 3 -- COMPRESS ???
LOCAL -- LOCAL (GLOBAL) ???
(
PARTITION PIXPK_TAB4_MAXVAL_MAXVALUE -- PARTITION ???
TABLESPACE INDEX1 -- TABLESPACE
PCTFREE 10 -- PCTFREE ???
INITRANS 2 -- INITRANS ???
STORAGE ( -- STORAGE ???
INITIAL 5M -- INITIAL 5M ???
PCTINCREASE 0 -- PCTINCREASE ???
)
)
NOPARALLEL -- NOPARALLEL (PARALLEL) ???
LOGGING -- LOGGING (NOLOGGING) ???
),
CONSTRAINT CHK_TAB4NOW CHECK (DAY = TRUNC(DATETIME))
DEFERRABLE -- DEFERRABLE ???
INITIALLY DEFERRED -- INITIALLY DEFERRED (IMMEDIATE) ???
)
PARTITION BY RANGE (ID1, DAY) -- BY ???
(
PARTITION PTAB4_MAXVAL_MAXVALUE VALUES LESS THAN (MAXVALUE, MAXVALUE) -- LESS THAN MAXVALUE ???
TABLESPACE DATA1
PCTFREE 10
INITRANS 2
STORAGE (
INITIAL 20M
PCTINCREASE 0
)
)
NOPARALLEL -- NOPARALLEL ???
NOCACHE -- NOCACHE ???
LOGGING -- LOGGING ???
ENABLE ROW MOVEMENT; -- ENABLE (DISABLE) MOVEMENT ???
ALTER INDEX IXPK_TAB4E MODIFY DEFAULT ATTRIBUTES TABLESPACE INDEX1; -- MODIFY ATTRIBUTES ???
CREATE TABLE T2
(P1 VARCHAR2(50 CHAR) NOT NULL
,V1 VARCHAR2(256 CHAR) NOT NULL
,B1 VARCHAR2(256 CHAR)
,CONSTRAINT PK_T2 PRIMARY KEY (P1)
)
ORGANIZATION INDEX -- ORGANIZATION ???
/
CREATE TABLE T3
(M1 NUMBER(5,0) NOT NULL
,GID NUMBER(38,0) NOT NULL
,US BLOB
)
PCTUSED 60 PCTFREE 10 -- PCTUSED PCTFREE ???
TABLESPACE TS1
LOB (US) -- LOB
STORE AS SECUREFILE L_T3_US ( -- STORE SECUREFILE ???
NOCACHE
LOGGING
DISABLE STORAGE IN ROW
TABLESPACE TSL1
)
PARTITION BY LIST (GID) -- LIST (HASH, REFERENCE) ???
(PARTITION T3_GID_P01
VALUES (1, 3)
TABLESPACE TSP1
)
,PARTITION T3_GID_P02
VALUES (2, 4)
TABLESPACE TSP2
)
,PARTITION T3_GID_P00
VALUES (DEFAULT)
TABLESPACE TS_GID_P00
)
/
SPOOL OFF
SET TIMING OFF