Exemplo n.º 1
0
 public string DropTable(string Json)
 {
     try
     {
         string TableName = JsonAdapter.TableNameFromJson(Json);
         string sql       = TableCollector.DropTable(TableName);
         NpgController.InvokeQueryWithoutAnswer(sql);
         return(new JObject().AddStatus("Success").ToString());
     }
     catch (Exception ex)
     {
         return(new JObject().AddStatus(ex).ToString());
     }
 }
Exemplo n.º 2
0
 public string CreateTable(string Json)
 {
     try
     {
         Table  table = JsonAdapter.AdaptTableFromJson(Json);
         string Sql   = TableCollector.CreateTable(table);
         NpgController.InvokeQueryWithoutAnswer(Sql);
         return(new JObject().AddStatus("Success").ToString());
     }
     catch (Exception ex)
     {
         return(new JObject().AddStatus(ex).ToString());
     }
 }