Example #1
0
 {JSON}
 */
 case "COLUNASTABELA":
     $m = new Metaestat();
     if (empty($_GET["tipo"])) {
         $_GET["tipo"] = "";
     }
     if ($_GET["formato"] == "json") {
         retornaJSON($m->colunasTabela($codigo_estat_conexao, $_GET["nome_esquema"], $_GET["nome_tabela"], $_GET["tipo"]));
     }
     exit;
     break;
 case "INFOTABELA":
     $m = new Metaestat();
     $colunas = $m->colunasTabela($codigo_estat_conexao, $_GET["nome_esquema"], $_GET["nome_tabela"], "");
     $comentario = $m->comentarioTabela($codigo_estat_conexao, $_GET["nome_esquema"], $_GET["nome_tabela"]);
     if ($_GET["formato"] == "json") {
         retornaJSON(array("colunas" => $colunas, "comentario" => $comentario));
     }
     exit;
 case "CRIACOLUNADB":
     $m = new Metaestat();
     if ($_GET["nome_esquema"] != "i3geo_metaestat") {
         retornaJSON("erro");
         exit;
     }
     retornaJSON($m->criaColunaDB($codigo_estat_conexao, $_GET["nome_esquema"], $_GET["nome_tabela"], $_GET["nova_coluna"], $_GET["tipo"]));
     exit;
     break;
 case "ALTERANOMECOLUNADB":
     $m = new Metaestat();