* Run code cleanup * Run dotnet format * Start manual fixes * Manual fixing of warnings * Fix nullability in columnalias * Fix tests * Fix up after merge * Start updating after review * Update editorconfig to contain new static & const rules * Fix up editorconfig to not contain duplicate rules * Fix up static member names * Fix up according to review * Update src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.DistributedCache.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/DependencyInjection/UmbracoBuilder.Repositories.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Examine/ContentIndexPopulator.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Examine/ContentIndexPopulator.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Examine/ContentValueSetValidator.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Examine/ContentValueSetValidator.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Examine/ContentValueSetValidator.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Examine/ExamineUmbracoIndexingHandler.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Examine/PublishedContentIndexPopulator.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Extensions/InstanceIdentifiableExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/HostedServices/RecurringHostedServiceBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/HostedServices/ReportSiteTask.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Logging/Serilog/LoggerConfigExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Logging/Serilog/LoggerConfigExtensions.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Macros/MacroTagParser.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Macros/MacroTagParser.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Macros/MacroTagParser.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Migrations/Expressions/Alter/Table/IAlterTableColumnOptionBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Migrations/Upgrade/V_10_0_0/AddMemberPropertiesAsColumns.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/ModelsBuilder/Building/TextBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Persistence/Dtos/ExternalLoginDto.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Persistence/Mappers/AccessMapper.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Persistence/Mappers/AuditEntryMapper.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Persistence/Mappers/MediaMapper.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Persistence/Mappers/MemberMapper.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Persistence/Mappers/PropertyGroupMapper.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Persistence/Mappers/PropertyGroupMapper.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Persistence/Mappers/PropertyTypeMapper.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Persistence/Mappers/PropertyTypeMapper.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Persistence/Mappers/RelationTypeMapper.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Persistence/Mappers/RelationTypeMapper.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Persistence/NPocoMapperCollectionBuilder.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Persistence/Querying/ExpressionVisitorBase.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Update src/Umbraco.Infrastructure/Persistence/Repositories/Implement/ExternalLoginRepository.cs Co-authored-by: Mole <nikolajlauridsen@protonmail.ch> * Fix [..] to substring * Fix after merge with 10/dev * Fox ContentValueSetValidator.cs * Update LoggerConfigExtensions Co-authored-by: Nikolaj Geisle <niko737@edu.ucl.dk> Co-authored-by: Mole <nikolajlauridsen@protonmail.ch>
84 lines
3.0 KiB
C#
84 lines
3.0 KiB
C#
using Umbraco.Cms.Core.Configuration.Models;
|
|
|
|
namespace Umbraco.Cms.Infrastructure.Persistence;
|
|
|
|
/// <summary>
|
|
/// Creates and manages the "ambient" database.
|
|
/// </summary>
|
|
public interface IUmbracoDatabaseFactory : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// Gets a value indicating whether the database factory is configured, i.e. whether
|
|
/// its connection string and provider name have been set. The factory may however not
|
|
/// be initialized (see <see cref="Initialized" />).
|
|
/// </summary>
|
|
bool Configured { get; }
|
|
|
|
/// <summary>
|
|
/// Gets a value indicating whether the database factory is initialized, i.e. whether
|
|
/// its internal state is ready and it has been possible to connect to the database.
|
|
/// </summary>
|
|
bool Initialized { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the connection string.
|
|
/// </summary>
|
|
/// <remarks>May return <c>null</c> if the database factory is not configured.</remarks>
|
|
string? ConnectionString { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the provider name.
|
|
/// </summary>
|
|
/// <remarks>May return <c>null</c> if the database factory is not configured.</remarks>
|
|
string? ProviderName { get; }
|
|
|
|
/// <summary>
|
|
/// Gets a value indicating whether the database factory is configured (see <see cref="Configured" />),
|
|
/// and it is possible to connect to the database. The factory may however not be initialized (see
|
|
/// <see cref="Initialized" />).
|
|
/// </summary>
|
|
bool CanConnect { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the <see cref="ISqlContext" />.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>Getting the <see cref="ISqlContext" /> causes the factory to initialize if it is not already initialized.</para>
|
|
/// </remarks>
|
|
ISqlContext SqlContext { get; }
|
|
|
|
/// <summary>
|
|
/// Gets the <see cref="IBulkSqlInsertProvider" />.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>
|
|
/// Getting the <see cref="IBulkSqlInsertProvider" /> causes the factory to initialize if it is not already
|
|
/// initialized.
|
|
/// </para>
|
|
/// </remarks>
|
|
IBulkSqlInsertProvider? BulkSqlInsertProvider { get; }
|
|
|
|
/// <summary>
|
|
/// Creates a new database.
|
|
/// </summary>
|
|
/// <remarks>
|
|
/// <para>The new database must be disposed after being used.</para>
|
|
/// <para>Creating a database causes the factory to initialize if it is not already initialized.</para>
|
|
/// </remarks>
|
|
IUmbracoDatabase CreateDatabase();
|
|
|
|
/// <summary>
|
|
/// Configures the database factory.
|
|
/// </summary>
|
|
void Configure(ConnectionStrings umbracoConnectionString);
|
|
|
|
[Obsolete("Please use alternative Configure method.")]
|
|
void Configure(string connectionString, string providerName) =>
|
|
Configure(new ConnectionStrings { ConnectionString = connectionString, ProviderName = providerName });
|
|
|
|
/// <summary>
|
|
/// Configures the database factory for upgrades.
|
|
/// </summary>
|
|
void ConfigureForUpgrade();
|
|
}
|