Exemple #1
0
 public override void RenameTable(string oldName, string newName)
 {
     oldName.MustNotBeEmpty();
     newName.MustNotBeEmpty();
     Db.ExecuteCommand(string.Format("alter table {0} rename to {1}", PostgresProvider.EscapeIdentifier(oldName),
                                     PostgresProvider.EscapeIdentifier(newName)));
 }
Exemple #2
0
 protected override string Escape(string name)
 {
     return(PostgresProvider.EscapeIdentifier(name));
 }
Exemple #3
0
        public override void provider_escape_name()
        {
            var txt = @"""public.test""";

            Assert.Equal(txt, PostgresProvider.EscapeIdentifier("public.test"));
        }
Exemple #4
0
 public void anything_with_dot_will_be_escaped_as_schema_table()
 {
     Assert.Equal("\"public\".\"mytable\"", PostgresProvider.EscapeIdentifier("public.mytable"));
 }
Exemple #5
0
 public void common_escaping()
 {
     Assert.Equal("\"mytable\"", PostgresProvider.EscapeIdentifier("mytable"));
     Assert.Equal("\"my table\"", PostgresProvider.EscapeIdentifier("my table"));
 }
Exemple #6
0
 public void already_escaped_id_are_not_escaped()
 {
     Assert.Equal("\"public.table\"", PostgresProvider.EscapeIdentifier("\"public.table\""));
     Assert.Equal("\"my table\"", PostgresProvider.EscapeIdentifier("\"my table\""));
 }
Exemple #7
0
 protected override string FormatName(string s)
 {
     return(PostgresProvider.EscapeIdentifier(s));
 }
Exemple #8
0
 protected override void WriteColumn(IndexColumn column)
 {
     Builder.Append(PostgresProvider.EscapeIdentifier(column.Name));
 }
Exemple #9
0
 protected override void WriteTableName()
 {
     Builder.Append(PostgresProvider.EscapeIdentifier(Index.TableName));
 }