2019-12-12 12:55:17 +01:00
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
using NPoco;
|
2021-01-18 15:40:22 +01:00
|
|
|
|
using Umbraco.Core.Migrations.Install;
|
2016-12-16 14:18:37 +01:00
|
|
|
|
|
|
|
|
|
|
namespace Umbraco.Core.Persistence
|
|
|
|
|
|
{
|
|
|
|
|
|
public interface IUmbracoDatabase : IDatabase
|
|
|
|
|
|
{
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the Sql context.
|
|
|
|
|
|
/// </summary>
|
2017-09-22 18:48:58 +02:00
|
|
|
|
ISqlContext SqlContext { get; }
|
2016-12-16 14:18:37 +01:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets the database instance unique identifier as a string.
|
|
|
|
|
|
/// </summary>
|
2017-07-20 11:21:28 +02:00
|
|
|
|
/// <remarks>UmbracoDatabase returns the first eight digits of its unique Guid and, in some
|
2016-12-16 14:18:37 +01:00
|
|
|
|
/// debug mode, the underlying database connection identifier (if any).</remarks>
|
|
|
|
|
|
string InstanceId { get; }
|
2017-05-12 14:49:44 +02:00
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Gets a value indicating whether the database is currently in a transaction.
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
bool InTransaction { get; }
|
2019-12-12 12:55:17 +01:00
|
|
|
|
|
|
|
|
|
|
bool EnableSqlCount { get; set; }
|
|
|
|
|
|
int SqlCount { get; }
|
2019-12-19 17:56:48 +11:00
|
|
|
|
int BulkInsertRecords<T>(IEnumerable<T> records);
|
2021-01-18 15:40:22 +01:00
|
|
|
|
bool IsUmbracoInstalled();
|
|
|
|
|
|
DatabaseSchemaResult ValidateSchema();
|
2016-12-16 14:18:37 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|