Working on this data setup logic
This commit is contained in:
parent
384cc3c6fd
commit
447b27f69b
16 changed files with 409 additions and 211 deletions
|
|
@ -2,7 +2,7 @@ using System.Data;
|
|||
using Insight.Database;
|
||||
|
||||
namespace Configuration.Core;
|
||||
public class ConfigurationRepository : IConfigurationRepository
|
||||
public class ConfigurationRepository : IConfigurationRepository
|
||||
{
|
||||
private readonly IDbConnection _connection;
|
||||
|
||||
|
|
@ -16,8 +16,8 @@ namespace Configuration.Core;
|
|||
const string sql = @"
|
||||
SELECT id, key, value, label, content_type, valid_from, expires_at, created_at, modified_at, etag
|
||||
FROM prod.app_configuration
|
||||
WHERE (expires_at IS NULL OR expires_at > CURRENT_TIMESTAMP)
|
||||
AND (valid_from IS NULL OR valid_from <= CURRENT_TIMESTAMP)";
|
||||
WHERE (expires_at IS NULL OR expires_at <= CURRENT_TIMESTAMP)
|
||||
AND (valid_from IS NULL OR valid_from >= CURRENT_TIMESTAMP)";
|
||||
|
||||
return await _connection.QueryAsync<AppConfiguration>(sql);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue