示例#1
0
    public void WithIncludes()
    {
        var annotation = IndexAnnotation.AutoName("dbo.Part", "Company", "PartNum");

        IndexDmlScriptCreator.GetScript(annotation).ToConsole();

        var annotation2 = IndexAnnotation.AutoName("dbo.Part", "Company, PartNum", "IUM,PUM");

        IndexDmlScriptCreator.GetScript(annotation2).ToConsole();
    }
示例#2
0
    public void SimpleTest()
    {
        var annotation = IndexAnnotation.AutoName("dbo.Part", "Company");

        IndexDmlScriptCreator.GetScript(annotation).ToConsole();

        var annotation2 = IndexAnnotation.AutoName("dbo.Part", "Company, PartNum");

        IndexDmlScriptCreator.GetScript(annotation2).ToConsole();
    }
示例#3
0
    private static string CreateIndexText(SqlTableForTemporal sqlTableForTemporal, DbTableName dbTableName)
    {
        if (sqlTableForTemporal.IndexAnnotations.Count == 0)
        {
            return(String.Empty);
        }

        var newIndexStatements = sqlTableForTemporal
                                 .IndexAnnotations
                                 .Select(ia => IndexDmlScriptCreator.GetScript(ia))
                                 .StringJoin(Environment.NewLine);

        return($"{newIndexStatements}");
    }