Ejemplo n.º 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();
    }
Ejemplo n.º 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();
    }
Ejemplo n.º 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}");
    }