Пример #1
0
        public async Task TruncateDocumentStorageAsync(IMartenDatabase database)
        {
            var sql = "truncate {0} cascade".ToFormat(TableName.QualifiedName);

            try
            {
                await database.RunSqlAsync(sql).ConfigureAwait(false);
            }
            catch (PostgresException e)
            {
                if (!e.Message.Contains("does not exist"))
                {
                    throw;
                }
            }
        }
Пример #2
0
 public Task TruncateDocumentStorageAsync(IMartenDatabase database)
 {
     return(database.RunSqlAsync($"truncate table {Events.DatabaseSchemaName}.mt_streams cascade"));
 }
 public Task TruncateDocumentStorageAsync(IMartenDatabase database)
 {
     return(database.RunSqlAsync(
                $"delete from {_parent.TableName.QualifiedName} where {SchemaConstants.DocumentTypeColumn} = '{_mapping.Alias}'"));
 }
Пример #4
0
        public Task TruncateDocumentStorageAsync(IMartenDatabase database)
        {
            var sql = "truncate {0} cascade".ToFormat(TableName.QualifiedName);

            return(database.RunSqlAsync(sql));
        }