Skip to content

Instantly share code, notes, and snippets.

@lucasnad27
Last active December 10, 2015 20:18
Show Gist options
  • Save lucasnad27/4486823 to your computer and use it in GitHub Desktop.
Save lucasnad27/4486823 to your computer and use it in GitHub Desktop.
SublimeSnippet
<snippet>
<content><![CDATA[
CREATE TABLE GCWGS84_VECTOR.${1:FeatureClassName}
(
${1:FeatureClassName}IDPK NVARCHAR2(20),
SDSID NVARCHAR2(20),
SDSFEATURENAME NVARCHAR2(80),
SDSFEATUREDESCRIPTION NCLOB,
SDSMETADATAID NVARCHAR2(80),
MEDIAIDFK NVARCHAR2(20),
GEOMETRY MDSYS.SDO_GEOMETRY
);
DELETE FROM USER_SDO_GEOM_METADATA WHERE table_name = '${1:FeatureClassName}';
INSERT INTO USER_SDO_GEOM_METADATA (TABLE_NAME, COLUMN_NAME, DIMINFO, SRID)
VALUES ('${1:FeatureClassName}', 'geometry',
MDSYS.SDO_DIM_ARRAY
(MDSYS.SDO_DIM_ELEMENT('X', -180.000000000, 180.000000000, 0.0000005),
MDSYS.SDO_DIM_ELEMENT('Y', -90.000000000, 90.000000000, 0.0000005)
),
8307);
commit;
--DROP INDEX ${1:FeatureClassName}_geometry_sidx force;
CREATE INDEX ${1:FeatureClassName}_geometry_sidx ON ${1:FeatureClassName}(GEOMETRY) INDEXTYPE IS MDSYS.SPATIAL_INDEX;
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>sds30_createtable</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.sql</scope> -->
</snippet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment