/// <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); } }
/// <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); } }
/// <summary> /// Drops relation tags. /// </summary> /// <param name="connection"></param> public static void DropRelationTagsTable(OracleConnection connection) { OracleSchemaTools.ExecuteScript(connection, TABLE_RELATION_TAGS_DROP); }
/// <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")); }
/// <summary> /// Creates relation tags. /// </summary> /// <param name="connection"></param> public static void CreateRelationTagsTable(OracleConnection connection) { OracleSchemaTools.ExecuteScript(connection, TABLE_RELATION_TAGS_CREATION); }
/// <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")); }
/// <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); }
/// <summary> /// Drops the way tags table. /// </summary> /// <param name="connection"></param> public static void DropWayTagsTable(OracleConnection connection) { OracleSchemaTools.ExecuteScript(connection, TABLE_WAY_TAGS_DROP); }
/// <summary> /// Creates the way nodes table. /// </summary> /// <param name="connection"></param> public static void CreateWayNodesTable(OracleConnection connection) { OracleSchemaTools.ExecuteScript(connection, TABLE_WAY_NODES_CREATION); }
/// <summary> /// Creates the node tags table. /// </summary> /// <param name="connection"></param> public static void CreateNodeTagsTable(OracleConnection connection) { OracleSchemaTools.ExecuteScript(connection, TABLE_NODE_TAGS_CREATION); }
/// <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")); }
/// <summary> /// Drop the nodes table. /// </summary> /// <param name="connection"></param> /// <returns></returns> public static void DropNodeTable(OracleConnection connection) { OracleSchemaTools.ExecuteScript(connection, TABLE_NODE_DROP); }