コード例 #1
0
            public async Task RemoveUnusedUrlsAsync(DataProvider.SearchDataProvider searchDP)  //$$$$
            {
                using (DataProvider.SearchDataUrlDataProvider searchUrlDP = new DataProvider.SearchDataUrlDataProvider()) {
                    string sql = @"
DELETE FROM {UrlTableName} USING {TableName}
WHERE {UrlTableName}.""SearchDataUrlId"" = {TableName}.""SearchDataUrlId""
        AND {TableName}.""SearchDataUrlId"" IS NULL";
                    IPostgreSQLTableInfo info = await searchUrlDP.GetDataProvider().GetIPostgreSQLTableInfoAsync();

                    sql = sql.Replace("{UrlTableName}", SQLBuilder.WrapIdentifier(info.GetTableName()));
                    await Direct_QueryAsync(sql);
                }
            }
コード例 #2
0
            public async Task RemoveUnusedUrlsAsync(DataProvider.SearchDataProvider searchDP)
            {
                using (DataProvider.SearchDataUrlDataProvider searchUrlDP = new DataProvider.SearchDataUrlDataProvider()) {
                    string        sql  = @"
DELETE {UrlTableName}
FROM {UrlTableName}
LEFT JOIN {TableName} ON {UrlTableName}.[SearchDataUrlId] = {TableName}.[SearchDataUrlId]
WHERE {TableName}.[SearchDataUrlId] IS NULL";
                    ISQLTableInfo info = await searchUrlDP.GetDataProvider().GetISQLTableInfoAsync();

                    sql = sql.Replace("{UrlTableName}", SQLBuilder.WrapIdentifier(info.GetTableName()));
                    await Direct_QueryAsync(sql);
                }
            }