Files
Umbraco-CMS/src/Umbraco.Core/Persistence/SqlSyntax/ISqlSyntaxProvider.cs
sitereactor 137a54b193 Refactoring DTOs for Identity seed, which is used by Sql Ce.
Updating unit tests and Contexts to include the ServiceContext and DatabaseContext.
2012-10-30 15:03:58 -01:00

30 lines
1.3 KiB
C#

using System;
using System.Collections.Generic;
using System.Data;
using Umbraco.Core.Persistence.DatabaseAnnotations;
using Umbraco.Core.Persistence.SqlSyntax.ModelDefinitions;
namespace Umbraco.Core.Persistence.SqlSyntax
{
/// <summary>
/// Defines an SqlSyntaxProvider
/// </summary>
public interface ISqlSyntaxProvider
{
string GetQuotedTableName(string tableName);
string GetQuotedColumnName(string columnName);
string GetQuotedName(string name);
bool DoesTableExist(Database db, string tableName);
string ToCreateTableStatement(TableDefinition tableDefinition);
List<string> ToCreateForeignKeyStatements(TableDefinition tableDefinition);
List<string> ToCreateIndexStatements(TableDefinition tableDefinition);
DbType GetColumnDbType(Type valueType);
string GetIndexType(IndexTypes indexTypes);
string GetColumnDefinition(ColumnDefinition column, string tableName);
string GetPrimaryKeyStatement(ColumnDefinition column, string tableName);
string ToCreatePrimaryKeyStatement(TableDefinition table);
string GetSpecialDbType(SpecialDbTypes dbTypes);
string GetConstraintDefinition(ColumnDefinition column, string tableName);
List<string> ToAlterIdentitySeedStatements(TableDefinition table);
}
}