Exemplo n.º 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)));
 }
Exemplo n.º 2
0
 protected override string Escape(string name)
 {
     return(PostgresProvider.EscapeIdentifier(name));
 }
Exemplo n.º 3
0
        public override void provider_escape_name()
        {
            var txt = @"""public.test""";

            Assert.Equal(txt, PostgresProvider.EscapeIdentifier("public.test"));
        }
Exemplo n.º 4
0
 public void anything_with_dot_will_be_escaped_as_schema_table()
 {
     Assert.Equal("\"public\".\"mytable\"", PostgresProvider.EscapeIdentifier("public.mytable"));
 }
Exemplo n.º 5
0
 public void common_escaping()
 {
     Assert.Equal("\"mytable\"", PostgresProvider.EscapeIdentifier("mytable"));
     Assert.Equal("\"my table\"", PostgresProvider.EscapeIdentifier("my table"));
 }
Exemplo n.º 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\""));
 }
Exemplo n.º 7
0
 protected override string FormatName(string s)
 {
     return(PostgresProvider.EscapeIdentifier(s));
 }
Exemplo n.º 8
0
 protected override void WriteColumn(IndexColumn column)
 {
     Builder.Append(PostgresProvider.EscapeIdentifier(column.Name));
 }
Exemplo n.º 9
0
 protected override void WriteTableName()
 {
     Builder.Append(PostgresProvider.EscapeIdentifier(Index.TableName));
 }