Example #1
0
        /// <summary>
        /// Drops objects in this schema.
        /// </summary>
        /// <param name="connection"></param>
        public static void Drop(OracleConnection connection)
        {
            if (OracleSchemaTools.DetectNodeTable(connection))
            {
                OracleSchemaTools.DropNodeTable(connection);
            }
            if (OracleSchemaTools.DetectNodeTagsTable(connection))
            {
                OracleSchemaTools.DropNodeTagsTable(connection);
            }

            if (OracleSchemaTools.DetectWayTable(connection))
            {
                OracleSchemaTools.DropWayTable(connection);
            }
            if (OracleSchemaTools.DetectWayTagsTable(connection))
            {
                OracleSchemaTools.DropWayTagsTable(connection);
            }
            if (OracleSchemaTools.DetectWayNodesTable(connection))
            {
                OracleSchemaTools.DropWayNodesTable(connection);
            }

            if (OracleSchemaTools.DetectRelationTable(connection))
            {
                OracleSchemaTools.DropRelationTable(connection);
            }
            if (OracleSchemaTools.DetectRelationTagsTable(connection))
            {
                OracleSchemaTools.DropRelationTagsTable(connection);
            }
            if (OracleSchemaTools.DetectRelationMembersTable(connection))
            {
                OracleSchemaTools.DropRelationMembersTable(connection);
            }
        }
Example #2
0
        /// <summary>
        /// Creates the entire schema but also detects existing tables.
        /// </summary>
        /// <param name="connection"></param>
        public static void CreateAndDetect(OracleConnection connection)
        {
            if (!OracleSchemaTools.DetectNodeTable(connection))
            {
                OracleSchemaTools.CreateNodeTable(connection);
            }
            if (!OracleSchemaTools.DetectNodeTagsTable(connection))
            {
                OracleSchemaTools.CreateNodeTagsTable(connection);
            }

            if (!OracleSchemaTools.DetectWayTable(connection))
            {
                OracleSchemaTools.CreateWayTable(connection);
            }
            if (!OracleSchemaTools.DetectWayTagsTable(connection))
            {
                OracleSchemaTools.CreateWayTagsTable(connection);
            }
            if (!OracleSchemaTools.DetectWayNodesTable(connection))
            {
                OracleSchemaTools.CreateWayNodesTable(connection);
            }

            if (!OracleSchemaTools.DetectRelationTable(connection))
            {
                OracleSchemaTools.CreateRelationTable(connection);
            }
            if (!OracleSchemaTools.DetectRelationTagsTable(connection))
            {
                OracleSchemaTools.CreateRelationTagsTable(connection);
            }
            if (!OracleSchemaTools.DetectRelationMembersTable(connection))
            {
                OracleSchemaTools.CreateRelationMembersTable(connection);
            }
        }
Example #3
0
 /// <summary>
 /// Drops relation tags.
 /// </summary>
 /// <param name="connection"></param>
 public static void DropRelationTagsTable(OracleConnection connection)
 {
     OracleSchemaTools.ExecuteScript(connection, TABLE_RELATION_TAGS_DROP);
 }
Example #4
0
 /// <summary>
 /// Returns true if the relation tags table exists.
 /// </summary>
 /// <param name="connection"></param>
 /// <returns></returns>
 public static bool DetectRelationTagsTable(OracleConnection connection)
 {
     return(OracleSchemaTools.DetectTable(connection, "relation_tags"));
 }
Example #5
0
 /// <summary>
 /// Creates relation tags.
 /// </summary>
 /// <param name="connection"></param>
 public static void CreateRelationTagsTable(OracleConnection connection)
 {
     OracleSchemaTools.ExecuteScript(connection, TABLE_RELATION_TAGS_CREATION);
 }
Example #6
0
 /// <summary>
 /// Returns true if the way tags table exists.
 /// </summary>
 /// <param name="connection"></param>
 public static bool DetectWayTagsTable(OracleConnection connection)
 {
     return(OracleSchemaTools.DetectTable(connection, "way_tags"));
 }
Example #7
0
 /// <summary>
 /// Drops the relation members table.
 /// </summary>
 /// <param name="connection"></param>
 /// <returns></returns>
 public static void DropRelationMembersTable(OracleConnection connection)
 {
     OracleSchemaTools.ExecuteScript(connection, TABLE_RELATION_MEMBERS_DROP);
 }
Example #8
0
 /// <summary>
 /// Drops the way tags table.
 /// </summary>
 /// <param name="connection"></param>
 public static void DropWayTagsTable(OracleConnection connection)
 {
     OracleSchemaTools.ExecuteScript(connection, TABLE_WAY_TAGS_DROP);
 }
Example #9
0
 /// <summary>
 /// Creates the way nodes table.
 /// </summary>
 /// <param name="connection"></param>
 public static void CreateWayNodesTable(OracleConnection connection)
 {
     OracleSchemaTools.ExecuteScript(connection, TABLE_WAY_NODES_CREATION);
 }
Example #10
0
 /// <summary>
 /// Creates the node tags table.
 /// </summary>
 /// <param name="connection"></param>
 public static void CreateNodeTagsTable(OracleConnection connection)
 {
     OracleSchemaTools.ExecuteScript(connection, TABLE_NODE_TAGS_CREATION);
 }
Example #11
0
 /// <summary>
 /// Returns true if the node tags table exists.
 /// </summary>
 /// <param name="connection"></param>
 /// <returns></returns>
 public static bool DetectNodeTagsTable(OracleConnection connection)
 {
     return(OracleSchemaTools.DetectTable(connection, "node_tags"));
 }
Example #12
0
 /// <summary>
 /// Drop the nodes table.
 /// </summary>
 /// <param name="connection"></param>
 /// <returns></returns>
 public static void DropNodeTable(OracleConnection connection)
 {
     OracleSchemaTools.ExecuteScript(connection, TABLE_NODE_DROP);
 }