@designliquido/lincones-sqlite 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/execucao.d.ts +1 -1
- package/execucao.js +52 -52
- package/execucao.js.map +1 -1
- package/fontes/avaliador-sintatico/avaliador-sintatico.d.ts +6 -15
- package/fontes/avaliador-sintatico/avaliador-sintatico.js +42 -261
- package/fontes/avaliador-sintatico/avaliador-sintatico.js.map +1 -1
- package/fontes/avaliador-sintatico/index.d.ts +1 -2
- package/fontes/avaliador-sintatico/index.js +5 -20
- package/fontes/avaliador-sintatico/index.js.map +1 -1
- package/fontes/comum/fontes/avaliador-sintatico/avaliador-sintatico-base.d.ts +36 -0
- package/{comum/fontes/avaliador-sintatico/avaliador-sintatico.js → fontes/comum/fontes/avaliador-sintatico/avaliador-sintatico-base.js} +444 -263
- package/fontes/comum/fontes/avaliador-sintatico/avaliador-sintatico-base.js.map +1 -0
- package/fontes/comum/fontes/avaliador-sintatico/avaliador-sintatico.d.ts +7 -0
- package/fontes/comum/fontes/avaliador-sintatico/avaliador-sintatico.js +12 -0
- package/fontes/comum/fontes/avaliador-sintatico/avaliador-sintatico.js.map +1 -0
- package/{comum → fontes/comum}/fontes/avaliador-sintatico/erro-avaliador-sintatico.d.ts +5 -5
- package/{comum → fontes/comum}/fontes/avaliador-sintatico/erro-avaliador-sintatico.js +11 -11
- package/fontes/comum/fontes/avaliador-sintatico/erro-avaliador-sintatico.js.map +1 -0
- package/fontes/comum/fontes/avaliador-sintatico/index.d.ts +3 -0
- package/{comum → fontes/comum}/fontes/avaliador-sintatico/index.js +19 -22
- package/fontes/comum/fontes/avaliador-sintatico/index.js.map +1 -0
- package/fontes/comum/fontes/comandos/alterar.d.ts +8 -0
- package/fontes/comum/fontes/comandos/alterar.js +14 -0
- package/fontes/comum/fontes/comandos/alterar.js.map +1 -0
- package/{comum → fontes/comum}/fontes/comandos/atualizar.d.ts +14 -14
- package/{comum → fontes/comum}/fontes/comandos/atualizar.js +13 -13
- package/fontes/comum/fontes/comandos/atualizar.js.map +1 -0
- package/{comum → fontes/comum}/fontes/comandos/comando.d.ts +6 -6
- package/{comum → fontes/comum}/fontes/comandos/comando.js +13 -13
- package/fontes/comum/fontes/comandos/comando.js.map +1 -0
- package/fontes/comum/fontes/comandos/criar.d.ts +8 -0
- package/{comum → fontes/comum}/fontes/comandos/criar.js +12 -12
- package/fontes/comum/fontes/comandos/criar.js.map +1 -0
- package/fontes/comum/fontes/comandos/excluir-entidade.d.ts +6 -0
- package/fontes/comum/fontes/comandos/excluir-entidade.js +13 -0
- package/fontes/comum/fontes/comandos/excluir-entidade.js.map +1 -0
- package/{comum → fontes/comum}/fontes/comandos/excluir.d.ts +6 -6
- package/{comum → fontes/comum}/fontes/comandos/excluir.js +12 -12
- package/fontes/comum/fontes/comandos/excluir.js.map +1 -0
- package/{comum → fontes/comum}/fontes/comandos/index.d.ts +8 -6
- package/{comum → fontes/comum}/fontes/comandos/index.js +24 -22
- package/fontes/comum/fontes/comandos/index.js.map +1 -0
- package/{comum → fontes/comum}/fontes/comandos/inserir.d.ts +8 -8
- package/{comum → fontes/comum}/fontes/comandos/inserir.js +13 -13
- package/fontes/comum/fontes/comandos/inserir.js.map +1 -0
- package/{comum → fontes/comum}/fontes/comandos/selecionar.d.ts +9 -9
- package/{comum → fontes/comum}/fontes/comandos/selecionar.js +14 -14
- package/fontes/comum/fontes/comandos/selecionar.js.map +1 -0
- package/{comum → fontes/comum}/fontes/construtos/coluna.d.ts +11 -11
- package/{comum → fontes/comum}/fontes/construtos/coluna.js +19 -15
- package/fontes/comum/fontes/construtos/coluna.js.map +1 -0
- package/{comum → fontes/comum}/fontes/construtos/condicao.d.ts +6 -6
- package/{comum → fontes/comum}/fontes/construtos/condicao.js +11 -11
- package/fontes/comum/fontes/construtos/condicao.js.map +1 -0
- package/{comum → fontes/comum}/fontes/construtos/index.d.ts +2 -1
- package/{comum → fontes/comum}/fontes/construtos/index.js +18 -17
- package/fontes/comum/fontes/construtos/index.js.map +1 -0
- package/fontes/comum/fontes/construtos/operacao-alteracao-tabela.d.ts +7 -0
- package/fontes/comum/fontes/construtos/operacao-alteracao-tabela.js +15 -0
- package/fontes/comum/fontes/construtos/operacao-alteracao-tabela.js.map +1 -0
- package/fontes/comum/fontes/construtos/restricao.d.ts +13 -0
- package/fontes/comum/fontes/construtos/restricao.js +19 -0
- package/fontes/comum/fontes/construtos/restricao.js.map +1 -0
- package/{comum → fontes/comum}/fontes/interfaces/avaliador-sintatico-interface.d.ts +14 -14
- package/{comum → fontes/comum}/fontes/interfaces/avaliador-sintatico-interface.js +2 -2
- package/fontes/comum/fontes/interfaces/avaliador-sintatico-interface.js.map +1 -0
- package/fontes/comum/fontes/interfaces/index.d.ts +3 -0
- package/fontes/comum/fontes/interfaces/index.js +20 -0
- package/fontes/comum/fontes/interfaces/index.js.map +1 -0
- package/fontes/comum/fontes/interfaces/lincones-interface.d.ts +3 -0
- package/{comum → fontes/comum}/fontes/interfaces/lincones-interface.js +2 -2
- package/fontes/comum/fontes/interfaces/lincones-interface.js.map +1 -0
- package/{comum → fontes/comum}/fontes/interfaces/retornos/index.d.ts +16 -16
- package/{comum → fontes/comum}/fontes/interfaces/retornos/index.js +2 -2
- package/fontes/comum/fontes/interfaces/retornos/index.js.map +1 -0
- package/{comum → fontes/comum}/fontes/interfaces/simbolo-interface.d.ts +6 -6
- package/{comum → fontes/comum}/fontes/interfaces/simbolo-interface.js +2 -2
- package/fontes/comum/fontes/interfaces/simbolo-interface.js.map +1 -0
- package/fontes/comum/fontes/lexador/index.d.ts +1 -0
- package/{comum/fontes/interfaces → fontes/comum/fontes/lexador}/index.js +17 -17
- package/fontes/comum/fontes/lexador/index.js.map +1 -0
- package/{comum/fontes/lexador/index.d.ts → fontes/comum/fontes/lexador/lexador.d.ts} +26 -26
- package/{comum/fontes/lexador/index.js → fontes/comum/fontes/lexador/lexador.js} +220 -220
- package/fontes/comum/fontes/lexador/lexador.js.map +1 -0
- package/{comum → fontes/comum}/fontes/lexador/simbolo.d.ts +9 -9
- package/{comum → fontes/comum}/fontes/lexador/simbolo.js +15 -15
- package/fontes/comum/fontes/lexador/simbolo.js.map +1 -0
- package/fontes/comum/fontes/palavras-reservadas.d.ts +51 -0
- package/{comum → fontes/comum}/fontes/palavras-reservadas.js +56 -31
- package/fontes/comum/fontes/palavras-reservadas.js.map +1 -0
- package/{comum → fontes/comum}/fontes/tipos-de-simbolos.d.ts +57 -38
- package/{comum → fontes/comum}/fontes/tipos-de-simbolos.js +58 -39
- package/fontes/comum/fontes/tipos-de-simbolos.js.map +1 -0
- package/fontes/comum/fontes/tradutor/index.d.ts +32 -0
- package/{comum → fontes/comum}/fontes/tradutor/index.js +238 -160
- package/fontes/comum/fontes/tradutor/index.js.map +1 -0
- package/fontes/comum/index.d.ts +8 -0
- package/fontes/comum/index.js +25 -0
- package/fontes/comum/index.js.map +1 -0
- package/{comum → fontes/comum}/jest.config.d.ts +3 -3
- package/{comum → fontes/comum}/jest.config.js +11 -11
- package/fontes/comum/jest.config.js.map +1 -0
- package/{comum/execucao.d.ts → fontes/comum/testes/avaliador-sintatico.test.d.ts} +1 -1
- package/fontes/comum/testes/avaliador-sintatico.test.js +86 -0
- package/fontes/comum/testes/avaliador-sintatico.test.js.map +1 -0
- package/fontes/comum/testes/lexador.test.d.ts +1 -0
- package/fontes/comum/testes/lexador.test.js +83 -0
- package/fontes/comum/testes/lexador.test.js.map +1 -0
- package/fontes/comum/testes/tradutor.test.d.ts +1 -0
- package/fontes/comum/testes/tradutor.test.js +133 -0
- package/fontes/comum/testes/tradutor.test.js.map +1 -0
- package/fontes/infraestrutura/cliente-sqlite.d.ts +10 -10
- package/fontes/infraestrutura/cliente-sqlite.js +71 -71
- package/fontes/infraestrutura/cliente-sqlite.js.map +1 -1
- package/fontes/infraestrutura/index.d.ts +2 -2
- package/fontes/infraestrutura/index.js +18 -18
- package/fontes/infraestrutura/retorno-comando.d.ts +8 -8
- package/fontes/infraestrutura/retorno-comando.js +28 -28
- package/fontes/infraestrutura/retorno-comando.js.map +1 -1
- package/fontes/lincones-sqlite.d.ts +13 -13
- package/fontes/lincones-sqlite.js +28 -28
- package/fontes/lincones-sqlite.js.map +1 -1
- package/fontes/palavras-reservadas.d.ts +26 -26
- package/fontes/palavras-reservadas.js +31 -31
- package/fontes/palavras-reservadas.js.map +1 -1
- package/fontes/tradutor/index.d.ts +21 -19
- package/fontes/tradutor/index.js +152 -149
- package/fontes/tradutor/index.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +17 -17
- package/package.json +17 -16
- package/comum/execucao.js +0 -40
- package/comum/execucao.js.map +0 -1
- package/comum/fontes/avaliador-sintatico/avaliador-sintatico-base.d.ts +0 -15
- package/comum/fontes/avaliador-sintatico/avaliador-sintatico-base.js +0 -46
- package/comum/fontes/avaliador-sintatico/avaliador-sintatico-base.js.map +0 -1
- package/comum/fontes/avaliador-sintatico/avaliador-sintatico.d.ts +0 -15
- package/comum/fontes/avaliador-sintatico/avaliador-sintatico.js.map +0 -1
- package/comum/fontes/avaliador-sintatico/erro-avaliador-sintatico.js.map +0 -1
- package/comum/fontes/avaliador-sintatico/index.d.ts +0 -3
- package/comum/fontes/avaliador-sintatico/index.js.map +0 -1
- package/comum/fontes/comandos/atualizar.js.map +0 -1
- package/comum/fontes/comandos/comando.js.map +0 -1
- package/comum/fontes/comandos/criar.d.ts +0 -7
- package/comum/fontes/comandos/criar.js.map +0 -1
- package/comum/fontes/comandos/excluir.js.map +0 -1
- package/comum/fontes/comandos/index.js.map +0 -1
- package/comum/fontes/comandos/inserir.js.map +0 -1
- package/comum/fontes/comandos/selecionar.js.map +0 -1
- package/comum/fontes/construtos/coluna.js.map +0 -1
- package/comum/fontes/construtos/condicao.js.map +0 -1
- package/comum/fontes/construtos/index.js.map +0 -1
- package/comum/fontes/interfaces/avaliador-sintatico-interface.js.map +0 -1
- package/comum/fontes/interfaces/index.d.ts +0 -3
- package/comum/fontes/interfaces/index.js.map +0 -1
- package/comum/fontes/interfaces/lincones-interface.d.ts +0 -3
- package/comum/fontes/interfaces/lincones-interface.js.map +0 -1
- package/comum/fontes/interfaces/retornos/index.js.map +0 -1
- package/comum/fontes/interfaces/simbolo-interface.js.map +0 -1
- package/comum/fontes/lexador/index.js.map +0 -1
- package/comum/fontes/lexador/simbolo.js.map +0 -1
- package/comum/fontes/lincones.d.ts +0 -10
- package/comum/fontes/lincones.js +0 -21
- package/comum/fontes/lincones.js.map +0 -1
- package/comum/fontes/palavras-reservadas.d.ts +0 -26
- package/comum/fontes/palavras-reservadas.js.map +0 -1
- package/comum/fontes/tipos-de-simbolos.js.map +0 -1
- package/comum/fontes/tradutor/index.d.ts +0 -18
- package/comum/fontes/tradutor/index.js.map +0 -1
- package/comum/index.d.ts +0 -1
- package/comum/index.js +0 -6
- package/comum/index.js.map +0 -1
- package/comum/jest.config.js.map +0 -1
- package/fontes/lexador/index.d.ts +0 -26
- package/fontes/lexador/index.js +0 -220
- package/fontes/lexador/index.js.map +0 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./cliente-sqlite"), exports);
|
|
18
|
-
__exportStar(require("./retorno-comando"), exports);
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./cliente-sqlite"), exports);
|
|
18
|
+
__exportStar(require("./retorno-comando"), exports);
|
|
19
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare class RetornoComando {
|
|
2
|
-
linhasAfetadas: number;
|
|
3
|
-
ultimoId: any;
|
|
4
|
-
linhasRetornadas: any[];
|
|
5
|
-
comandoExecutado: string;
|
|
6
|
-
mensagemExecucao: string;
|
|
7
|
-
constructor(resultadoExecucao: any);
|
|
8
|
-
}
|
|
1
|
+
export declare class RetornoComando {
|
|
2
|
+
linhasAfetadas: number;
|
|
3
|
+
ultimoId: any;
|
|
4
|
+
linhasRetornadas: any[];
|
|
5
|
+
comandoExecutado: string;
|
|
6
|
+
mensagemExecucao: string;
|
|
7
|
+
constructor(resultadoExecucao: any);
|
|
8
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RetornoComando = void 0;
|
|
4
|
-
class RetornoComando {
|
|
5
|
-
constructor(resultadoExecucao) {
|
|
6
|
-
this.linhasRetornadas = [];
|
|
7
|
-
if (!resultadoExecucao) {
|
|
8
|
-
return;
|
|
9
|
-
}
|
|
10
|
-
if (resultadoExecucao.changes) {
|
|
11
|
-
this.linhasAfetadas = resultadoExecucao.changes;
|
|
12
|
-
}
|
|
13
|
-
if (resultadoExecucao.lastID) {
|
|
14
|
-
this.ultimoId = resultadoExecucao.lastID;
|
|
15
|
-
}
|
|
16
|
-
if (resultadoExecucao.stmt) {
|
|
17
|
-
const linhas = this.linhasAfetadas || 0;
|
|
18
|
-
this.comandoExecutado = resultadoExecucao.stmt;
|
|
19
|
-
this.mensagemExecucao = `Ok (${linhas} ${linhas > 1 ? 'linhas afetadas' : 'linha afetada'})`;
|
|
20
|
-
}
|
|
21
|
-
if (Array.isArray(resultadoExecucao)) {
|
|
22
|
-
const linhas = this.linhasRetornadas.length || 0;
|
|
23
|
-
this.linhasRetornadas = resultadoExecucao;
|
|
24
|
-
this.mensagemExecucao = `(${linhas} ${linhas > 1 ? 'linhas retornadas' : 'linha retornada'})`;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.RetornoComando = RetornoComando;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RetornoComando = void 0;
|
|
4
|
+
class RetornoComando {
|
|
5
|
+
constructor(resultadoExecucao) {
|
|
6
|
+
this.linhasRetornadas = [];
|
|
7
|
+
if (!resultadoExecucao) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
if (resultadoExecucao.changes) {
|
|
11
|
+
this.linhasAfetadas = resultadoExecucao.changes;
|
|
12
|
+
}
|
|
13
|
+
if (resultadoExecucao.lastID) {
|
|
14
|
+
this.ultimoId = resultadoExecucao.lastID;
|
|
15
|
+
}
|
|
16
|
+
if (resultadoExecucao.stmt) {
|
|
17
|
+
const linhas = this.linhasAfetadas || 0;
|
|
18
|
+
this.comandoExecutado = resultadoExecucao.stmt;
|
|
19
|
+
this.mensagemExecucao = `Ok (${linhas} ${linhas > 1 ? 'linhas afetadas' : 'linha afetada'})`;
|
|
20
|
+
}
|
|
21
|
+
if (Array.isArray(resultadoExecucao)) {
|
|
22
|
+
const linhas = this.linhasRetornadas.length || 0;
|
|
23
|
+
this.linhasRetornadas = resultadoExecucao;
|
|
24
|
+
this.mensagemExecucao = `(${linhas} ${linhas > 1 ? 'linhas retornadas' : 'linha retornada'})`;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.RetornoComando = RetornoComando;
|
|
29
29
|
//# sourceMappingURL=retorno-comando.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retorno-comando.js","sourceRoot":"","sources":["../../../fontes/infraestrutura/retorno-comando.ts"],"names":[],"mappings":";;;AAAA,MAAa,cAAc;IAOvB,YAAY,iBAAsB;QAJlC,qBAAgB,GAAU,EAAE,CAAC;QAKzB,IAAI,CAAC,iBAAiB,EAAE;
|
|
1
|
+
{"version":3,"file":"retorno-comando.js","sourceRoot":"","sources":["../../../fontes/infraestrutura/retorno-comando.ts"],"names":[],"mappings":";;;AAAA,MAAa,cAAc;IAOvB,YAAY,iBAAsB;QAJlC,qBAAgB,GAAU,EAAE,CAAC;QAKzB,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACrB,OAAO;QACX,CAAC;QAED,IAAI,iBAAiB,CAAC,OAAO,EAAE,CAAC;YAC5B,IAAI,CAAC,cAAc,GAAG,iBAAiB,CAAC,OAAO,CAAC;QACpD,CAAC;QAED,IAAI,iBAAiB,CAAC,MAAM,EAAE,CAAC;YAC3B,IAAI,CAAC,QAAQ,GAAG,iBAAiB,CAAC,MAAM,CAAC;QAC7C,CAAC;QAED,IAAI,iBAAiB,CAAC,IAAI,EAAE,CAAC;YACzB,MAAM,MAAM,GAAG,IAAI,CAAC,cAAc,IAAI,CAAC,CAAC;YACxC,IAAI,CAAC,gBAAgB,GAAG,iBAAiB,CAAC,IAAI,CAAC;YAC/C,IAAI,CAAC,gBAAgB,GAAG,OAAO,MAAM,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,eAAe,GAAG,CAAC;QACjG,CAAC;QAED,IAAI,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,EAAE,CAAC;YACnC,MAAM,MAAM,GAAG,IAAI,CAAC,gBAAgB,CAAC,MAAM,IAAI,CAAC,CAAA;YAChD,IAAI,CAAC,gBAAgB,GAAG,iBAAiB,CAAC;YAC1C,IAAI,CAAC,gBAAgB,GAAG,IAAI,MAAM,IAAI,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,iBAAiB,GAAG,CAAC;QAClG,CAAC;IACL,CAAC;CACJ;AAhCD,wCAgCC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AvaliadorSintatico } from "
|
|
3
|
-
import { Lexador } from "./lexador";
|
|
4
|
-
import { ClienteSQLite } from "./infraestrutura/cliente-sqlite";
|
|
5
|
-
import { RetornoComando } from "./infraestrutura";
|
|
6
|
-
export declare class LinconesSQLite {
|
|
7
|
-
lexador: Lexador;
|
|
8
|
-
avaliadorSintatico: AvaliadorSintatico;
|
|
9
|
-
tradutor:
|
|
10
|
-
clienteSQLite: ClienteSQLite;
|
|
11
|
-
constructor();
|
|
12
|
-
executar(comando: string): Promise<RetornoComando>;
|
|
13
|
-
}
|
|
1
|
+
import { TradutorSqLite } from "./tradutor";
|
|
2
|
+
import { AvaliadorSintatico } from "./comum/fontes/avaliador-sintatico";
|
|
3
|
+
import { Lexador } from "./comum/fontes/lexador";
|
|
4
|
+
import { ClienteSQLite } from "./infraestrutura/cliente-sqlite";
|
|
5
|
+
import { RetornoComando } from "./infraestrutura";
|
|
6
|
+
export declare class LinconesSQLite {
|
|
7
|
+
lexador: Lexador;
|
|
8
|
+
avaliadorSintatico: AvaliadorSintatico;
|
|
9
|
+
tradutor: TradutorSqLite;
|
|
10
|
+
clienteSQLite: ClienteSQLite;
|
|
11
|
+
constructor();
|
|
12
|
+
executar(comando: string): Promise<RetornoComando>;
|
|
13
|
+
}
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.LinconesSQLite = void 0;
|
|
4
|
-
const tradutor_1 = require("
|
|
5
|
-
const avaliador_sintatico_1 = require("
|
|
6
|
-
const lexador_1 = require("./lexador");
|
|
7
|
-
const cliente_sqlite_1 = require("./infraestrutura/cliente-sqlite");
|
|
8
|
-
const infraestrutura_1 = require("./infraestrutura");
|
|
9
|
-
class LinconesSQLite {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.lexador = new lexador_1.Lexador();
|
|
12
|
-
this.avaliadorSintatico = new avaliador_sintatico_1.AvaliadorSintatico();
|
|
13
|
-
this.tradutor = new tradutor_1.
|
|
14
|
-
this.clienteSQLite = new cliente_sqlite_1.ClienteSQLite();
|
|
15
|
-
}
|
|
16
|
-
async executar(comando) {
|
|
17
|
-
const resultadoLexador = this.lexador.mapear([comando]);
|
|
18
|
-
const resultadoAvaliacaoSintatica = this.avaliadorSintatico.analisar(resultadoLexador);
|
|
19
|
-
const resultadoTraducao = this.tradutor.traduzir(resultadoAvaliacaoSintatica.comandos);
|
|
20
|
-
if (resultadoAvaliacaoSintatica.comandos.length <= 0) {
|
|
21
|
-
return new infraestrutura_1.RetornoComando(null);
|
|
22
|
-
}
|
|
23
|
-
const resultadoExecucao = await this.clienteSQLite.executarComando(resultadoTraducao);
|
|
24
|
-
const retorno = new infraestrutura_1.RetornoComando(resultadoExecucao);
|
|
25
|
-
return retorno;
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
exports.LinconesSQLite = LinconesSQLite;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LinconesSQLite = void 0;
|
|
4
|
+
const tradutor_1 = require("./tradutor");
|
|
5
|
+
const avaliador_sintatico_1 = require("./comum/fontes/avaliador-sintatico");
|
|
6
|
+
const lexador_1 = require("./comum/fontes/lexador");
|
|
7
|
+
const cliente_sqlite_1 = require("./infraestrutura/cliente-sqlite");
|
|
8
|
+
const infraestrutura_1 = require("./infraestrutura");
|
|
9
|
+
class LinconesSQLite {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.lexador = new lexador_1.Lexador();
|
|
12
|
+
this.avaliadorSintatico = new avaliador_sintatico_1.AvaliadorSintatico();
|
|
13
|
+
this.tradutor = new tradutor_1.TradutorSqLite();
|
|
14
|
+
this.clienteSQLite = new cliente_sqlite_1.ClienteSQLite();
|
|
15
|
+
}
|
|
16
|
+
async executar(comando) {
|
|
17
|
+
const resultadoLexador = this.lexador.mapear([comando]);
|
|
18
|
+
const resultadoAvaliacaoSintatica = this.avaliadorSintatico.analisar(resultadoLexador);
|
|
19
|
+
const resultadoTraducao = this.tradutor.traduzir(resultadoAvaliacaoSintatica.comandos);
|
|
20
|
+
if (resultadoAvaliacaoSintatica.comandos.length <= 0) {
|
|
21
|
+
return new infraestrutura_1.RetornoComando(null);
|
|
22
|
+
}
|
|
23
|
+
const resultadoExecucao = await this.clienteSQLite.executarComando(resultadoTraducao);
|
|
24
|
+
const retorno = new infraestrutura_1.RetornoComando(resultadoExecucao);
|
|
25
|
+
return retorno;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.LinconesSQLite = LinconesSQLite;
|
|
29
29
|
//# sourceMappingURL=lincones-sqlite.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lincones-sqlite.js","sourceRoot":"","sources":["../../fontes/lincones-sqlite.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"lincones-sqlite.js","sourceRoot":"","sources":["../../fontes/lincones-sqlite.ts"],"names":[],"mappings":";;;AAAA,yCAA4C;AAC5C,4EAAwE;AACxE,oDAAiD;AACjD,oEAAgE;AAChE,qDAAkD;AAElD,MAAa,cAAc;IAMvB;QACI,IAAI,CAAC,OAAO,GAAG,IAAI,iBAAO,EAAE,CAAC;QAC7B,IAAI,CAAC,kBAAkB,GAAG,IAAI,wCAAkB,EAAE,CAAC;QACnD,IAAI,CAAC,QAAQ,GAAG,IAAI,yBAAc,EAAE,CAAC;QACrC,IAAI,CAAC,aAAa,GAAG,IAAI,8BAAa,EAAE,CAAC;IAC7C,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,OAAe;QAC1B,MAAM,gBAAgB,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;QACxD,MAAM,2BAA2B,GAAG,IAAI,CAAC,kBAAkB,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAAC;QACvF,MAAM,iBAAiB,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,2BAA2B,CAAC,QAAQ,CAAC,CAAC;QAEvF,IAAI,2BAA2B,CAAC,QAAQ,CAAC,MAAM,IAAI,CAAC,EAAE,CAAC;YACnD,OAAO,IAAI,+BAAc,CAAC,IAAI,CAAC,CAAC;QACpC,CAAC;QAED,MAAM,iBAAiB,GAAG,MAAM,IAAI,CAAC,aAAa,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;QACtF,MAAM,OAAO,GAAG,IAAI,+BAAc,CAAC,iBAAiB,CAAC,CAAC;QAEtD,OAAO,OAAO,CAAC;IACnB,CAAC;CACJ;AA3BD,wCA2BC"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
declare const _default: {
|
|
2
|
-
atualizar: string;
|
|
3
|
-
auto: string;
|
|
4
|
-
chave: string;
|
|
5
|
-
criar: string;
|
|
6
|
-
de: string;
|
|
7
|
-
definir: string;
|
|
8
|
-
e: string;
|
|
9
|
-
em: string;
|
|
10
|
-
excluir: string;
|
|
11
|
-
falso: string;
|
|
12
|
-
incremento: string;
|
|
13
|
-
inserir: string;
|
|
14
|
-
inteiro: string;
|
|
15
|
-
logico: string;
|
|
16
|
-
nao: string;
|
|
17
|
-
nulo: string;
|
|
18
|
-
onde: string;
|
|
19
|
-
primaria: string;
|
|
20
|
-
selecionar: string;
|
|
21
|
-
tabela: string;
|
|
22
|
-
texto: string;
|
|
23
|
-
valores: string;
|
|
24
|
-
verdadeiro: string;
|
|
25
|
-
};
|
|
26
|
-
export default _default;
|
|
1
|
+
declare const _default: {
|
|
2
|
+
atualizar: string;
|
|
3
|
+
auto: string;
|
|
4
|
+
chave: string;
|
|
5
|
+
criar: string;
|
|
6
|
+
de: string;
|
|
7
|
+
definir: string;
|
|
8
|
+
e: string;
|
|
9
|
+
em: string;
|
|
10
|
+
excluir: string;
|
|
11
|
+
falso: string;
|
|
12
|
+
incremento: string;
|
|
13
|
+
inserir: string;
|
|
14
|
+
inteiro: string;
|
|
15
|
+
logico: string;
|
|
16
|
+
nao: string;
|
|
17
|
+
nulo: string;
|
|
18
|
+
onde: string;
|
|
19
|
+
primaria: string;
|
|
20
|
+
selecionar: string;
|
|
21
|
+
tabela: string;
|
|
22
|
+
texto: string;
|
|
23
|
+
valores: string;
|
|
24
|
+
verdadeiro: string;
|
|
25
|
+
};
|
|
26
|
+
export default _default;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const tipos_de_simbolos_1 = __importDefault(require("
|
|
7
|
-
exports.default = {
|
|
8
|
-
atualizar: tipos_de_simbolos_1.default.ATUALIZAR,
|
|
9
|
-
auto: tipos_de_simbolos_1.default.AUTO,
|
|
10
|
-
chave: tipos_de_simbolos_1.default.CHAVE,
|
|
11
|
-
criar: tipos_de_simbolos_1.default.CRIAR,
|
|
12
|
-
de: tipos_de_simbolos_1.default.DE,
|
|
13
|
-
definir: tipos_de_simbolos_1.default.DEFINIR,
|
|
14
|
-
e: tipos_de_simbolos_1.default.E,
|
|
15
|
-
em: tipos_de_simbolos_1.default.EM,
|
|
16
|
-
excluir: tipos_de_simbolos_1.default.EXCLUIR,
|
|
17
|
-
falso: tipos_de_simbolos_1.default.FALSO,
|
|
18
|
-
incremento: tipos_de_simbolos_1.default.INCREMENTO,
|
|
19
|
-
inserir: tipos_de_simbolos_1.default.INSERIR,
|
|
20
|
-
inteiro: tipos_de_simbolos_1.default.INTEIRO,
|
|
21
|
-
logico: tipos_de_simbolos_1.default.LOGICO,
|
|
22
|
-
nao: tipos_de_simbolos_1.default.NAO,
|
|
23
|
-
nulo: tipos_de_simbolos_1.default.NULO,
|
|
24
|
-
onde: tipos_de_simbolos_1.default.ONDE,
|
|
25
|
-
primaria: tipos_de_simbolos_1.default.PRIMARIA,
|
|
26
|
-
selecionar: tipos_de_simbolos_1.default.SELECIONAR,
|
|
27
|
-
tabela: tipos_de_simbolos_1.default.TABELA,
|
|
28
|
-
texto: tipos_de_simbolos_1.default.TEXTO,
|
|
29
|
-
valores: tipos_de_simbolos_1.default.VALORES,
|
|
30
|
-
verdadeiro: tipos_de_simbolos_1.default.VERDADEIRO
|
|
31
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const tipos_de_simbolos_1 = __importDefault(require("./comum/fontes/tipos-de-simbolos"));
|
|
7
|
+
exports.default = {
|
|
8
|
+
atualizar: tipos_de_simbolos_1.default.ATUALIZAR,
|
|
9
|
+
auto: tipos_de_simbolos_1.default.AUTO,
|
|
10
|
+
chave: tipos_de_simbolos_1.default.CHAVE,
|
|
11
|
+
criar: tipos_de_simbolos_1.default.CRIAR,
|
|
12
|
+
de: tipos_de_simbolos_1.default.DE,
|
|
13
|
+
definir: tipos_de_simbolos_1.default.DEFINIR,
|
|
14
|
+
e: tipos_de_simbolos_1.default.E,
|
|
15
|
+
em: tipos_de_simbolos_1.default.EM,
|
|
16
|
+
excluir: tipos_de_simbolos_1.default.EXCLUIR,
|
|
17
|
+
falso: tipos_de_simbolos_1.default.FALSO,
|
|
18
|
+
incremento: tipos_de_simbolos_1.default.INCREMENTO,
|
|
19
|
+
inserir: tipos_de_simbolos_1.default.INSERIR,
|
|
20
|
+
inteiro: tipos_de_simbolos_1.default.INTEIRO,
|
|
21
|
+
logico: tipos_de_simbolos_1.default.LOGICO,
|
|
22
|
+
nao: tipos_de_simbolos_1.default.NAO,
|
|
23
|
+
nulo: tipos_de_simbolos_1.default.NULO,
|
|
24
|
+
onde: tipos_de_simbolos_1.default.ONDE,
|
|
25
|
+
primaria: tipos_de_simbolos_1.default.PRIMARIA,
|
|
26
|
+
selecionar: tipos_de_simbolos_1.default.SELECIONAR,
|
|
27
|
+
tabela: tipos_de_simbolos_1.default.TABELA,
|
|
28
|
+
texto: tipos_de_simbolos_1.default.TEXTO,
|
|
29
|
+
valores: tipos_de_simbolos_1.default.VALORES,
|
|
30
|
+
verdadeiro: tipos_de_simbolos_1.default.VERDADEIRO
|
|
31
|
+
};
|
|
32
32
|
//# sourceMappingURL=palavras-reservadas.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"palavras-reservadas.js","sourceRoot":"","sources":["../../fontes/palavras-reservadas.ts"],"names":[],"mappings":";;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"palavras-reservadas.js","sourceRoot":"","sources":["../../fontes/palavras-reservadas.ts"],"names":[],"mappings":";;;;;AAAA,yFAA+D;AAE/D,kBAAe;IACX,SAAS,EAAE,2BAAe,CAAC,SAAS;IACpC,IAAI,EAAE,2BAAe,CAAC,IAAI;IAC1B,KAAK,EAAE,2BAAe,CAAC,KAAK;IAC5B,KAAK,EAAE,2BAAe,CAAC,KAAK;IAC5B,EAAE,EAAE,2BAAe,CAAC,EAAE;IACtB,OAAO,EAAE,2BAAe,CAAC,OAAO;IAChC,CAAC,EAAE,2BAAe,CAAC,CAAC;IACpB,EAAE,EAAE,2BAAe,CAAC,EAAE;IACtB,OAAO,EAAE,2BAAe,CAAC,OAAO;IAChC,KAAK,EAAE,2BAAe,CAAC,KAAK;IAC5B,UAAU,EAAE,2BAAe,CAAC,UAAU;IACtC,OAAO,EAAE,2BAAe,CAAC,OAAO;IAChC,OAAO,EAAE,2BAAe,CAAC,OAAO;IAChC,MAAM,EAAE,2BAAe,CAAC,MAAM;IAC9B,GAAG,EAAE,2BAAe,CAAC,GAAG;IACxB,IAAI,EAAE,2BAAe,CAAC,IAAI;IAC1B,IAAI,EAAE,2BAAe,CAAC,IAAI;IAC1B,QAAQ,EAAE,2BAAe,CAAC,QAAQ;IAClC,UAAU,EAAE,2BAAe,CAAC,UAAU;IACtC,MAAM,EAAE,2BAAe,CAAC,MAAM;IAC9B,KAAK,EAAE,2BAAe,CAAC,KAAK;IAC5B,OAAO,EAAE,2BAAe,CAAC,OAAO;IAChC,UAAU,EAAE,2BAAe,CAAC,UAAU;CACzC,CAAC"}
|
|
@@ -1,19 +1,21 @@
|
|
|
1
|
-
import { Coluna } from
|
|
2
|
-
import { Atualizar, Comando, Criar, Excluir, Inserir, Selecionar } from
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
1
|
+
import { Coluna } from '../comum/fontes/construtos';
|
|
2
|
+
import { Atualizar, Comando, Criar, Excluir, Inserir, Selecionar } from '../comum/fontes/comandos';
|
|
3
|
+
import { TradutorSqlAnsi } from '../comum';
|
|
4
|
+
export declare class TradutorSqLite extends TradutorSqlAnsi {
|
|
5
|
+
traduzirOperador(operador: string): boolean | "=";
|
|
6
|
+
traduzirComandoAtualizar(comandoAtualizar: Atualizar): string;
|
|
7
|
+
traduzirColuna(coluna: Coluna): string;
|
|
8
|
+
traduzirComandoCriar(comandoCriar: Criar): string;
|
|
9
|
+
traduzirComandoExcluir(comandoExcluir: Excluir): string;
|
|
10
|
+
traduzirComandoInserir(comandoInserir: Inserir): string;
|
|
11
|
+
traduzirComandoSelecionar(comandoSelecionar: Selecionar): string;
|
|
12
|
+
dicionarioComandos: {
|
|
13
|
+
Alterar: any;
|
|
14
|
+
Atualizar: any;
|
|
15
|
+
Criar: any;
|
|
16
|
+
Excluir: any;
|
|
17
|
+
Inserir: any;
|
|
18
|
+
Selecionar: any;
|
|
19
|
+
};
|
|
20
|
+
traduzir(comandos: Comando[]): string;
|
|
21
|
+
}
|