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(); if ($_GET["nome_esquema"] != "i3geo_metaestat") { retornaJSON("erro"); exit; } retornaJSON($m->alteraNomeColunaDB($codigo_estat_conexao, $_GET["nome_esquema"], $_GET["nome_tabela"], $_GET["nome_coluna"], $_GET["novonome_coluna"])); exit; break; case "OBTEMDADOSTABELADB": $m = new Metaestat(); if ($_GET["formato"] == "json") { retornaJSON($m->obtemDadosTabelaDB($codigo_estat_conexao, $_GET["nome_esquema"], $_GET["nome_tabela"], $_GET["geo"], $_GET["nreg"]));