/// <summary> /// Creates a new SQLite target /// </summary> /// <param name="connection_string">The SQLite connection string to use</param> /// <param name="create_schema">Should we detect if the db tables exist and attempt to create them?</param> /// <param name="geo_filter">The geos filter to be used</param> /// <param name="tag_filter">The tags filter to be used</param> public SQLiteOsmStreamTarget(string connection_string, bool create_schema = false, Filter geo_filter = null, TagFilter tag_filter = null) { if (geo_filter == null) { geo_filter = Filter.Any(); } _geo_filter = geo_filter; if (tag_filter == null) { tag_filter = TagFilter.Any(); } _tag_filter = tag_filter; _connection_string = connection_string; _create_and_detect_schema = create_schema; ConnectionOwner = false; }
/// <summary> /// Creates a new SQLite target /// </summary> /// <param name="in_memory">Is the DB in memory? (default is false)</param> /// <param name="path">The path to the DB, or its descriptor in memory (if any)</param> /// <param name="password">The DB password (if any)</param> /// <param name="create_schema">Do the db tables need to be created?</param> /// <param name="geo_filter">The geos filter to be used</param> /// <param name="tag_filter">The tags filter to be used</param> public SQLiteOsmStreamTarget(bool in_memory = false, string path = null, string password = null, bool create_schema = false, Filter geo_filter = null, TagFilter tag_filter = null) { if (geo_filter == null) { geo_filter = Filter.Any(); } _geo_filter = geo_filter; if (tag_filter == null) { tag_filter = TagFilter.Any(); } _tag_filter = tag_filter; _connection_string = SQLiteSchemaTools.BuildConnectionString(in_memory, path, password); _create_and_detect_schema = create_schema; ConnectionOwner = false; }