@designliquido/delegua-entidades 0.0.0
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/README.md +96 -0
- package/fontes/analisador-dicas.d.ts +49 -0
- package/fontes/analisador-dicas.d.ts.map +1 -0
- package/fontes/analisador-dicas.js +145 -0
- package/fontes/analisador-dicas.js.map +1 -0
- package/fontes/cache-consultas.d.ts +39 -0
- package/fontes/cache-consultas.d.ts.map +1 -0
- package/fontes/cache-consultas.js +98 -0
- package/fontes/cache-consultas.js.map +1 -0
- package/fontes/carregador-lotes.d.ts +64 -0
- package/fontes/carregador-lotes.d.ts.map +1 -0
- package/fontes/carregador-lotes.js +148 -0
- package/fontes/carregador-lotes.js.map +1 -0
- package/fontes/carregador-preguicoso.d.ts +34 -0
- package/fontes/carregador-preguicoso.d.ts.map +1 -0
- package/fontes/carregador-preguicoso.js +157 -0
- package/fontes/carregador-preguicoso.js.map +1 -0
- package/fontes/colecao.d.ts +74 -0
- package/fontes/colecao.d.ts.map +1 -0
- package/fontes/colecao.js +374 -0
- package/fontes/colecao.js.map +1 -0
- package/fontes/construtor-consulta.d.ts +129 -0
- package/fontes/construtor-consulta.d.ts.map +1 -0
- package/fontes/construtor-consulta.js +446 -0
- package/fontes/construtor-consulta.js.map +1 -0
- package/fontes/contexto-entidades.d.ts +119 -0
- package/fontes/contexto-entidades.d.ts.map +1 -0
- package/fontes/contexto-entidades.js +329 -0
- package/fontes/contexto-entidades.js.map +1 -0
- package/fontes/detector-n-mais-um.d.ts +87 -0
- package/fontes/detector-n-mais-um.d.ts.map +1 -0
- package/fontes/detector-n-mais-um.js +225 -0
- package/fontes/detector-n-mais-um.js.map +1 -0
- package/fontes/entidade.d.ts +82 -0
- package/fontes/entidade.d.ts.map +1 -0
- package/fontes/entidade.js +467 -0
- package/fontes/entidade.js.map +1 -0
- package/fontes/erros/erro-concorrencia.d.ts +11 -0
- package/fontes/erros/erro-concorrencia.d.ts.map +1 -0
- package/fontes/erros/erro-concorrencia.js +18 -0
- package/fontes/erros/erro-concorrencia.js.map +1 -0
- package/fontes/erros/erro-tabela-nao-encontrada.d.ts +4 -0
- package/fontes/erros/erro-tabela-nao-encontrada.d.ts.map +1 -0
- package/fontes/erros/erro-tabela-nao-encontrada.js +11 -0
- package/fontes/erros/erro-tabela-nao-encontrada.js.map +1 -0
- package/fontes/erros/erro-validacao.d.ts +9 -0
- package/fontes/erros/erro-validacao.d.ts.map +1 -0
- package/fontes/erros/erro-validacao.js +13 -0
- package/fontes/erros/erro-validacao.js.map +1 -0
- package/fontes/erros/index.d.ts +4 -0
- package/fontes/erros/index.d.ts.map +1 -0
- package/fontes/erros/index.js +20 -0
- package/fontes/erros/index.js.map +1 -0
- package/fontes/gerenciador-cache.d.ts +87 -0
- package/fontes/gerenciador-cache.d.ts.map +1 -0
- package/fontes/gerenciador-cache.js +147 -0
- package/fontes/gerenciador-cache.js.map +1 -0
- package/fontes/ilc/gerador-definicoes.d.ts +13 -0
- package/fontes/ilc/gerador-definicoes.d.ts.map +1 -0
- package/fontes/ilc/gerador-definicoes.js +96 -0
- package/fontes/ilc/gerador-definicoes.js.map +1 -0
- package/fontes/ilc/gerador-entidades.d.ts +10 -0
- package/fontes/ilc/gerador-entidades.d.ts.map +1 -0
- package/fontes/ilc/gerador-entidades.js +318 -0
- package/fontes/ilc/gerador-entidades.js.map +1 -0
- package/fontes/ilc/leitor-configuracao.d.ts +32 -0
- package/fontes/ilc/leitor-configuracao.d.ts.map +1 -0
- package/fontes/ilc/leitor-configuracao.js +124 -0
- package/fontes/ilc/leitor-configuracao.js.map +1 -0
- package/fontes/ilc/migracoes.d.ts +3 -0
- package/fontes/ilc/migracoes.d.ts.map +1 -0
- package/fontes/ilc/migracoes.js +215 -0
- package/fontes/ilc/migracoes.js.map +1 -0
- package/fontes/ilc/semeadura.d.ts +2 -0
- package/fontes/ilc/semeadura.d.ts.map +1 -0
- package/fontes/ilc/semeadura.js +50 -0
- package/fontes/ilc/semeadura.js.map +1 -0
- package/fontes/indicadores-performance/executor-analise-performance.d.ts +80 -0
- package/fontes/indicadores-performance/executor-analise-performance.d.ts.map +1 -0
- package/fontes/indicadores-performance/executor-analise-performance.js +212 -0
- package/fontes/indicadores-performance/executor-analise-performance.js.map +1 -0
- package/fontes/indicadores-performance/index.d.ts +26 -0
- package/fontes/indicadores-performance/index.d.ts.map +1 -0
- package/fontes/indicadores-performance/index.js +199 -0
- package/fontes/indicadores-performance/index.js.map +1 -0
- package/fontes/interfaces-tipos/analise-n1-interface.d.ts +13 -0
- package/fontes/interfaces-tipos/analise-n1-interface.d.ts.map +1 -0
- package/fontes/interfaces-tipos/analise-n1-interface.js +3 -0
- package/fontes/interfaces-tipos/analise-n1-interface.js.map +1 -0
- package/fontes/interfaces-tipos/atributo-interface.d.ts +30 -0
- package/fontes/interfaces-tipos/atributo-interface.d.ts.map +1 -0
- package/fontes/interfaces-tipos/atributo-interface.js +3 -0
- package/fontes/interfaces-tipos/atributo-interface.js.map +1 -0
- package/fontes/interfaces-tipos/coluna-computada-interface.d.ts +16 -0
- package/fontes/interfaces-tipos/coluna-computada-interface.d.ts.map +1 -0
- package/fontes/interfaces-tipos/coluna-computada-interface.js +3 -0
- package/fontes/interfaces-tipos/coluna-computada-interface.js.map +1 -0
- package/fontes/interfaces-tipos/configuracao-banco-dados-interface.d.ts +48 -0
- package/fontes/interfaces-tipos/configuracao-banco-dados-interface.d.ts.map +1 -0
- package/fontes/interfaces-tipos/configuracao-banco-dados-interface.js +3 -0
- package/fontes/interfaces-tipos/configuracao-banco-dados-interface.js.map +1 -0
- package/fontes/interfaces-tipos/entidade-interface.d.ts +37 -0
- package/fontes/interfaces-tipos/entidade-interface.d.ts.map +1 -0
- package/fontes/interfaces-tipos/entidade-interface.js +3 -0
- package/fontes/interfaces-tipos/entidade-interface.js.map +1 -0
- package/fontes/interfaces-tipos/ganchos.d.ts +12 -0
- package/fontes/interfaces-tipos/ganchos.d.ts.map +1 -0
- package/fontes/interfaces-tipos/ganchos.js +3 -0
- package/fontes/interfaces-tipos/ganchos.js.map +1 -0
- package/fontes/interfaces-tipos/index.d.ts +17 -0
- package/fontes/interfaces-tipos/index.d.ts.map +1 -0
- package/fontes/interfaces-tipos/index.js +33 -0
- package/fontes/interfaces-tipos/index.js.map +1 -0
- package/fontes/interfaces-tipos/indice-interface.d.ts +16 -0
- package/fontes/interfaces-tipos/indice-interface.d.ts.map +1 -0
- package/fontes/interfaces-tipos/indice-interface.js +3 -0
- package/fontes/interfaces-tipos/indice-interface.js.map +1 -0
- package/fontes/interfaces-tipos/informacao-consulta-interface.d.ts +12 -0
- package/fontes/interfaces-tipos/informacao-consulta-interface.d.ts.map +1 -0
- package/fontes/interfaces-tipos/informacao-consulta-interface.js +3 -0
- package/fontes/interfaces-tipos/informacao-consulta-interface.js.map +1 -0
- package/fontes/interfaces-tipos/muito-para-muitos-interface.d.ts +33 -0
- package/fontes/interfaces-tipos/muito-para-muitos-interface.d.ts.map +1 -0
- package/fontes/interfaces-tipos/muito-para-muitos-interface.js +3 -0
- package/fontes/interfaces-tipos/muito-para-muitos-interface.js.map +1 -0
- package/fontes/interfaces-tipos/opcoes-serializacao-interface.d.ts +14 -0
- package/fontes/interfaces-tipos/opcoes-serializacao-interface.d.ts.map +1 -0
- package/fontes/interfaces-tipos/opcoes-serializacao-interface.js +3 -0
- package/fontes/interfaces-tipos/opcoes-serializacao-interface.js.map +1 -0
- package/fontes/interfaces-tipos/polimorfico-interface.d.ts +32 -0
- package/fontes/interfaces-tipos/polimorfico-interface.d.ts.map +1 -0
- package/fontes/interfaces-tipos/polimorfico-interface.js +3 -0
- package/fontes/interfaces-tipos/polimorfico-interface.js.map +1 -0
- package/fontes/interfaces-tipos/relacionamento-interface.d.ts +23 -0
- package/fontes/interfaces-tipos/relacionamento-interface.d.ts.map +1 -0
- package/fontes/interfaces-tipos/relacionamento-interface.js +3 -0
- package/fontes/interfaces-tipos/relacionamento-interface.js.map +1 -0
- package/fontes/interfaces-tipos/restricao-interface.d.ts +14 -0
- package/fontes/interfaces-tipos/restricao-interface.d.ts.map +1 -0
- package/fontes/interfaces-tipos/restricao-interface.js +3 -0
- package/fontes/interfaces-tipos/restricao-interface.js.map +1 -0
- package/fontes/interfaces-tipos/semente-interface.d.ts +7 -0
- package/fontes/interfaces-tipos/semente-interface.d.ts.map +1 -0
- package/fontes/interfaces-tipos/semente-interface.js +3 -0
- package/fontes/interfaces-tipos/semente-interface.js.map +1 -0
- package/fontes/interfaces-tipos/tabela-interface.d.ts +12 -0
- package/fontes/interfaces-tipos/tabela-interface.d.ts.map +1 -0
- package/fontes/interfaces-tipos/tabela-interface.js +3 -0
- package/fontes/interfaces-tipos/tabela-interface.js.map +1 -0
- package/fontes/interfaces-tipos/transacao-interface.d.ts +35 -0
- package/fontes/interfaces-tipos/transacao-interface.d.ts.map +1 -0
- package/fontes/interfaces-tipos/transacao-interface.js +3 -0
- package/fontes/interfaces-tipos/transacao-interface.js.map +1 -0
- package/fontes/migracoes/executor-migracoes.d.ts +14 -0
- package/fontes/migracoes/executor-migracoes.d.ts.map +1 -0
- package/fontes/migracoes/executor-migracoes.js +177 -0
- package/fontes/migracoes/executor-migracoes.js.map +1 -0
- package/fontes/migracoes/gerador-migracoes.d.ts +15 -0
- package/fontes/migracoes/gerador-migracoes.d.ts.map +1 -0
- package/fontes/migracoes/gerador-migracoes.js +108 -0
- package/fontes/migracoes/gerador-migracoes.js.map +1 -0
- package/fontes/migracoes/migracao.d.ts +35 -0
- package/fontes/migracoes/migracao.d.ts.map +1 -0
- package/fontes/migracoes/migracao.js +66 -0
- package/fontes/migracoes/migracao.js.map +1 -0
- package/fontes/migracoes/semeador.d.ts +18 -0
- package/fontes/migracoes/semeador.d.ts.map +1 -0
- package/fontes/migracoes/semeador.js +109 -0
- package/fontes/migracoes/semeador.js.map +1 -0
- package/fontes/rastreador-mudancas.d.ts +27 -0
- package/fontes/rastreador-mudancas.d.ts.map +1 -0
- package/fontes/rastreador-mudancas.js +94 -0
- package/fontes/rastreador-mudancas.js.map +1 -0
- package/fontes/relacionamento.d.ts +11 -0
- package/fontes/relacionamento.d.ts.map +1 -0
- package/fontes/relacionamento.js +15 -0
- package/fontes/relacionamento.js.map +1 -0
- package/fontes/roteador-bancos.d.ts +50 -0
- package/fontes/roteador-bancos.d.ts.map +1 -0
- package/fontes/roteador-bancos.js +90 -0
- package/fontes/roteador-bancos.js.map +1 -0
- package/fontes/serializador.d.ts +46 -0
- package/fontes/serializador.d.ts.map +1 -0
- package/fontes/serializador.js +79 -0
- package/fontes/serializador.js.map +1 -0
- package/fontes/taquigrafia.d.ts +41 -0
- package/fontes/taquigrafia.d.ts.map +1 -0
- package/fontes/taquigrafia.js +96 -0
- package/fontes/taquigrafia.js.map +1 -0
- package/fontes/tipos.d.ts +3 -0
- package/fontes/tipos.d.ts.map +1 -0
- package/fontes/tipos.js +3 -0
- package/fontes/tipos.js.map +1 -0
- package/fontes/transacao.d.ts +81 -0
- package/fontes/transacao.d.ts.map +1 -0
- package/fontes/transacao.js +243 -0
- package/fontes/transacao.js.map +1 -0
- package/fontes/validacoes/validador.d.ts +19 -0
- package/fontes/validacoes/validador.d.ts.map +1 -0
- package/fontes/validacoes/validador.js +157 -0
- package/fontes/validacoes/validador.js.map +1 -0
- package/index.d.ts +36 -0
- package/index.d.ts.map +1 -0
- package/index.js +59 -0
- package/index.js.map +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Benchmarks de Performance - Suite Completa
|
|
4
|
+
*
|
|
5
|
+
* Testa performance de cache, batch loading, e operações principais
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.performanceCache = performanceCache;
|
|
9
|
+
exports.performanceCarregadorLote = performanceCarregadorLote;
|
|
10
|
+
exports.performanceComparativoCache = performanceComparativoCache;
|
|
11
|
+
exports.testeEstressCache = testeEstressCache;
|
|
12
|
+
exports.executarTodosIndicadoresPerformance = executarTodosIndicadoresPerformance;
|
|
13
|
+
const executor_analise_performance_1 = require("./executor-analise-performance");
|
|
14
|
+
const cache_consultas_1 = require("../cache-consultas");
|
|
15
|
+
const carregador_lotes_1 = require("../carregador-lotes");
|
|
16
|
+
/**
|
|
17
|
+
* Benchmarks de Cache
|
|
18
|
+
*/
|
|
19
|
+
async function performanceCache() {
|
|
20
|
+
console.log("\n📊 BENCHMARKS DE CACHE DE CONSULTAS\n");
|
|
21
|
+
const executor = new executor_analise_performance_1.ExecutorAnalisePerformance();
|
|
22
|
+
const cache = new cache_consultas_1.CacheConsultas(1000);
|
|
23
|
+
// Benchmark 1: Armazenamento
|
|
24
|
+
await executor.executarSync("Cache: Armazenar consulta", () => {
|
|
25
|
+
const consulta = { sql: "SELECT * FROM usuarios", params: [] };
|
|
26
|
+
cache.armazenar("SELECT * FROM usuarios", consulta, [1]);
|
|
27
|
+
}, { iteracoes: 10000 });
|
|
28
|
+
// Benchmark 2: Busca com hit
|
|
29
|
+
cache.limparTudo();
|
|
30
|
+
const consulta = { sql: "SELECT * FROM usuarios", params: [] };
|
|
31
|
+
cache.armazenar("SELECT * FROM usuarios", consulta, [1]);
|
|
32
|
+
await executor.executarSync("Cache: Busca sucesso (hit)", () => {
|
|
33
|
+
cache.obter("SELECT * FROM usuarios", [1]);
|
|
34
|
+
}, { iteracoes: 10000 });
|
|
35
|
+
// Benchmark 3: Busca com miss
|
|
36
|
+
await executor.executarSync("Cache: Busca falha (miss)", () => {
|
|
37
|
+
cache.obter("SELECT * FROM inexistente", [1]);
|
|
38
|
+
}, { iteracoes: 10000 });
|
|
39
|
+
// Benchmark 4: Taxa de acerto com muitos acessos
|
|
40
|
+
cache.limparTudo();
|
|
41
|
+
for (let i = 0; i < 100; i++) {
|
|
42
|
+
const consulta2 = { sql: `SELECT ${i}`, params: [] };
|
|
43
|
+
cache.armazenar(`SELECT ${i}`, consulta2, [i]);
|
|
44
|
+
}
|
|
45
|
+
let hits = 0;
|
|
46
|
+
await executor.executarSync("Cache: 90% hits (acesso repetido)", () => {
|
|
47
|
+
if (Math.random() < 0.9) {
|
|
48
|
+
cache.obter("SELECT 1", [1]);
|
|
49
|
+
hits++;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
cache.obter("SELECT inexistente", [1]);
|
|
53
|
+
}
|
|
54
|
+
}, { iteracoes: 1000 });
|
|
55
|
+
console.log(executor.obterRelatorio());
|
|
56
|
+
console.log(`\nTaxa de acerto: ${cache.obterEstatisticas().taxaAcerto}`);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Benchmarks de Carregador em Lote
|
|
60
|
+
*/
|
|
61
|
+
async function performanceCarregadorLote() {
|
|
62
|
+
console.log("\n📊 BENCHMARKS DE CARREGADOR EM LOTE\n");
|
|
63
|
+
const executor = new executor_analise_performance_1.ExecutorAnalisePerformance();
|
|
64
|
+
// Benchmark 1: Carregamento simples (sem batch)
|
|
65
|
+
let chamadas1 = 0;
|
|
66
|
+
const funcao1 = async (ids) => {
|
|
67
|
+
chamadas1++;
|
|
68
|
+
return new Map(ids.map(id => [id, `usuario_${id}`]));
|
|
69
|
+
};
|
|
70
|
+
const carregador1 = new carregador_lotes_1.CarregadorLote(funcao1, { tamanhoLote: 1000, cache: false });
|
|
71
|
+
const tempo1 = await executor.executar("Carregador: 100 hits sequenciais (sem batch)", async () => {
|
|
72
|
+
await carregador1.carregar(Math.floor(Math.random() * 100));
|
|
73
|
+
}, { iteracoes: 100, aquecimento: 0 });
|
|
74
|
+
// Benchmark 2: Carregamento com batching
|
|
75
|
+
let chamadas2 = 0;
|
|
76
|
+
const funcao2 = async (ids) => {
|
|
77
|
+
chamadas2++;
|
|
78
|
+
// Simula I/O
|
|
79
|
+
return new Map(ids.map(id => [id, `usuario_${id}`]));
|
|
80
|
+
};
|
|
81
|
+
const carregador2 = new carregador_lotes_1.CarregadorLote(funcao2, {
|
|
82
|
+
tamanhoLote: 10,
|
|
83
|
+
intervaloMs: 5,
|
|
84
|
+
cache: false
|
|
85
|
+
});
|
|
86
|
+
const tempo2 = await executor.executar("Carregador: 100 hits com batching", async () => {
|
|
87
|
+
await carregador2.carregar(Math.floor(Math.random() * 100));
|
|
88
|
+
}, { iteracoes: 100, aquecimento: 0 });
|
|
89
|
+
// Benchmark 3: Com cache ativado
|
|
90
|
+
let chamadas3 = 0;
|
|
91
|
+
const funcao3 = async (ids) => {
|
|
92
|
+
chamadas3++;
|
|
93
|
+
return new Map(ids.map(id => [id, `usuario_${id}`]));
|
|
94
|
+
};
|
|
95
|
+
const carregador3 = new carregador_lotes_1.CarregadorLote(funcao3, {
|
|
96
|
+
tamanhoLote: 10,
|
|
97
|
+
intervaloMs: 5,
|
|
98
|
+
cache: true
|
|
99
|
+
});
|
|
100
|
+
const tempo3 = await executor.executar("Carregador: 100 hits com batching + cache", async () => {
|
|
101
|
+
await carregador3.carregar(Math.floor(Math.random() * 20)); // Menos IDs = mais cache hits
|
|
102
|
+
}, { iteracoes: 100, aquecimento: 0 });
|
|
103
|
+
console.log(executor.obterRelatorio());
|
|
104
|
+
console.log(`\nChamadas de banco:`);
|
|
105
|
+
console.log(` Sem batch: ${chamadas1}`);
|
|
106
|
+
console.log(` Com batch: ${chamadas2}`);
|
|
107
|
+
console.log(` Com cache: ${chamadas3}`);
|
|
108
|
+
console.log(`\nRedução de queries:`);
|
|
109
|
+
console.log(` Lote: ${((1 - chamadas2 / chamadas1) * 100).toFixed(1)}% menos queries`);
|
|
110
|
+
console.log(` Cache: ${((1 - chamadas3 / chamadas1) * 100).toFixed(1)}% menos queries`);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Comparação: Com vs Sem Cache
|
|
114
|
+
*/
|
|
115
|
+
async function performanceComparativoCache() {
|
|
116
|
+
console.log("\n📊 BENCHMARK COMPARATIVO: COM VS SEM CACHE\n");
|
|
117
|
+
const executor = new executor_analise_performance_1.ExecutorAnalisePerformance();
|
|
118
|
+
// Sem cache
|
|
119
|
+
let chamadas1 = 0;
|
|
120
|
+
const funcao1 = async (ids) => {
|
|
121
|
+
chamadas1++;
|
|
122
|
+
return new Map(ids.map(id => [id, `usuario_${id}`]));
|
|
123
|
+
};
|
|
124
|
+
// Com cache
|
|
125
|
+
let chamadas2 = 0;
|
|
126
|
+
const funcao2 = async (ids) => {
|
|
127
|
+
chamadas2++;
|
|
128
|
+
return new Map(ids.map(id => [id, `usuario_${id}`]));
|
|
129
|
+
};
|
|
130
|
+
const carregadorSemCache = new carregador_lotes_1.CarregadorLote(funcao1, {
|
|
131
|
+
tamanhoLote: 10,
|
|
132
|
+
cache: false
|
|
133
|
+
});
|
|
134
|
+
const carregadorComCache = new carregador_lotes_1.CarregadorLote(funcao2, {
|
|
135
|
+
tamanhoLote: 10,
|
|
136
|
+
cache: true
|
|
137
|
+
});
|
|
138
|
+
const resultado = await executor.comparar("Carregamento com/sem cache", "Sem cache", async () => {
|
|
139
|
+
await carregadorSemCache.carregar(1); // Sempre o mesmo ID
|
|
140
|
+
}, "Com cache", async () => {
|
|
141
|
+
await carregadorComCache.carregar(1);
|
|
142
|
+
}, { iteracoes: 100, aquecimento: 10 });
|
|
143
|
+
console.log("\n📈 Resultado Comparativo:");
|
|
144
|
+
console.log(` ${resultado.resultadoA.nome}: ${resultado.resultadoA.mediaMs.toFixed(3)}ms`);
|
|
145
|
+
console.log(` ${resultado.resultadoB.nome}: ${resultado.resultadoB.mediaMs.toFixed(3)}ms`);
|
|
146
|
+
console.log(` ${resultado.diferenca.mensagem}`);
|
|
147
|
+
console.log(`\nChamadas de banco:`);
|
|
148
|
+
console.log(` Sem cache: ${chamadas1} chamadas`);
|
|
149
|
+
console.log(` Com cache: ${chamadas2} chamadas`);
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* Teste de Estresse do Cache
|
|
153
|
+
*/
|
|
154
|
+
async function testeEstressCache() {
|
|
155
|
+
console.log("\n📊 TESTE DE ESTRESSE: CACHE\n");
|
|
156
|
+
const executor = new executor_analise_performance_1.ExecutorAnalisePerformance();
|
|
157
|
+
const cache = new cache_consultas_1.CacheConsultas(100);
|
|
158
|
+
// Teste 1: Armazenamento sob pressão
|
|
159
|
+
await executor.executar("Cache: Armazenar 10000 consultas diferentes", () => {
|
|
160
|
+
const id = Math.floor(Math.random() * 10000);
|
|
161
|
+
const consulta = { sql: `SELECT ${id}`, params: [] };
|
|
162
|
+
cache.armazenar(`SELECT ${id}`, consulta, [id]);
|
|
163
|
+
}, { iteracoes: 10000, aquecimento: 0 });
|
|
164
|
+
// Teste 2: Acesso sob pressão (cache cheio)
|
|
165
|
+
await executor.executar("Cache: Buscar em cache de 100 items", () => {
|
|
166
|
+
const id = Math.floor(Math.random() * 10000);
|
|
167
|
+
cache.obter(`SELECT ${id}`, [id]);
|
|
168
|
+
}, { iteracoes: 10000, aquecimento: 0 });
|
|
169
|
+
console.log(executor.obterRelatorio());
|
|
170
|
+
const stats = cache.obterEstatisticas();
|
|
171
|
+
console.log(`\nEstatísticas finais:`);
|
|
172
|
+
console.log(` Tamanho: ${stats.tamanho}/${stats.limite}`);
|
|
173
|
+
console.log(` Taxa de acerto: ${stats.taxaAcerto}`);
|
|
174
|
+
console.log(` Limpezas: ${stats.limpezas}`);
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Executa todos os benchmarks
|
|
178
|
+
*/
|
|
179
|
+
async function executarTodosIndicadoresPerformance() {
|
|
180
|
+
console.log("╔════════════════════════════════════════════════════════════╗");
|
|
181
|
+
console.log("║ SUITE COMPLETA DE PERFORMANCE ║");
|
|
182
|
+
console.log("╚════════════════════════════════════════════════════════════╝");
|
|
183
|
+
try {
|
|
184
|
+
await performanceCache();
|
|
185
|
+
await performanceCarregadorLote();
|
|
186
|
+
await performanceComparativoCache();
|
|
187
|
+
await testeEstressCache();
|
|
188
|
+
console.log("\n✅ Todos os indicadores de performance foram executados com sucesso!");
|
|
189
|
+
}
|
|
190
|
+
catch (erro) {
|
|
191
|
+
console.error("\n❌ Erro durante indicadores de performance:", erro);
|
|
192
|
+
process.exit(1);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
// Executar se chamado diretamente
|
|
196
|
+
if (require.main === module) {
|
|
197
|
+
executarTodosIndicadoresPerformance();
|
|
198
|
+
}
|
|
199
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../fontes/indicadores-performance/index.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AASH,4CA6DC;AAKD,8DAyEC;AAKD,kEAiDC;AAKD,8CAkCC;AAKD,kFAgBC;AApQD,iFAA4E;AAC5E,wDAAoD;AACpD,0DAAqD;AAErD;;GAEG;AACI,KAAK,UAAU,gBAAgB;IAClC,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;IAEvD,MAAM,QAAQ,GAAG,IAAI,yDAA0B,EAAE,CAAC;IAClD,MAAM,KAAK,GAAG,IAAI,gCAAc,CAAC,IAAI,CAAC,CAAC;IAEvC,6BAA6B;IAC7B,MAAM,QAAQ,CAAC,YAAY,CACvB,2BAA2B,EAC3B,GAAG,EAAE;QACD,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,wBAAwB,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;QAC/D,KAAK,CAAC,SAAS,CAAC,wBAAwB,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAC7D,CAAC,EACD,EAAE,SAAS,EAAE,KAAK,EAAE,CACvB,CAAC;IAEF,6BAA6B;IAC7B,KAAK,CAAC,UAAU,EAAE,CAAC;IACnB,MAAM,QAAQ,GAAG,EAAE,GAAG,EAAE,wBAAwB,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC;IAC/D,KAAK,CAAC,SAAS,CAAC,wBAAwB,EAAE,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IAEzD,MAAM,QAAQ,CAAC,YA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BAAwB,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,CAAC,cAAc,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC;IAC3D,OAAO,CAAC,GAAG,CAAC,qBAAqB,KAAK,CAAC,UAAU,EAAE,CAAC,CAAC;IACrD,OAAO,CAAC,GAAG,CAAC,eAAe,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC;AACjD,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,mCAAmC;IACrD,OAAO,CAAC,GAAG,CAAC,gEAAgE,CAAC,CAAC;IAC9E,OAAO,CAAC,GAAG,CAAC,gEAAgE,CAAC,CAAC;IAC9E,OAAO,CAAC,GAAG,CAAC,gEAAgE,CAAC,CAAC;IAE9E,IAAI,CAAC;QACD,MAAM,gBAAgB,EAAE,CAAC;QACzB,MAAM,yBAAyB,EAAE,CAAC;QAClC,MAAM,2BAA2B,EAAE,CAAC;QACpC,MAAM,iBAAiB,EAAE,CAAC;QAE1B,OAAO,CAAC,GAAG,CAAC,uEAAuE,CAAC,CAAC;IACzF,CAAC;IAAC,OAAO,IAAI,EAAE,CAAC;QACZ,OAAO,CAAC,KAAK,CAAC,8CAA8C,EAAE,IAAI,CAAC,CAAC;QACpE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC;AAED,kCAAkC;AAClC,IAAI,OAAO,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;IAC1B,mCAAmC,EAAE,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InformacaoConsulta } from "./informacao-consulta-interface";
|
|
2
|
+
/**
|
|
3
|
+
* Análise de um padrão N+1 detectado.
|
|
4
|
+
*/
|
|
5
|
+
export interface AnaliseN1 {
|
|
6
|
+
detectado: boolean;
|
|
7
|
+
consultaPrincipal?: InformacaoConsulta;
|
|
8
|
+
consultasRelacionadas?: InformacaoConsulta[];
|
|
9
|
+
quantidadeRegistros?: number;
|
|
10
|
+
quantidadeConsultas?: number;
|
|
11
|
+
sugestao?: string;
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=analise-n1-interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analise-n1-interface.d.ts","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/analise-n1-interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAErE;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB,SAAS,EAAE,OAAO,CAAC;IACnB,iBAAiB,CAAC,EAAE,kBAAkB,CAAC;IACvC,qBAAqB,CAAC,EAAE,kBAAkB,EAAE,CAAC;IAC7C,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"analise-n1-interface.js","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/analise-n1-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface que representa um atributo.
|
|
3
|
+
*
|
|
4
|
+
* @interface AtributoInterface
|
|
5
|
+
* @property {string} nome - O nome do atributo.
|
|
6
|
+
* @property {string} tipo - O tipo do atributo.
|
|
7
|
+
* @property {number} [precisao] - Para tipos numéricos: número total de dígitos
|
|
8
|
+
* @property {number} [escala] - Para tipos decimais: número de dígitos após o ponto decimal
|
|
9
|
+
* @property {number} [tamanho] - Para tipos texto/varchar: comprimento máximo
|
|
10
|
+
* @property {any} [valorPadrao] - Valor padrão para a coluna
|
|
11
|
+
* @property {boolean} [anulavel] - Se aceita valores null (padrão: true)
|
|
12
|
+
* @property {boolean} [unico] - Se os valores devem ser únicos
|
|
13
|
+
* @property {boolean} [autoIncremento] - Se é auto incrementada
|
|
14
|
+
* @property {boolean} [chavePrimaria] - Se é chave primária
|
|
15
|
+
* @property {string} [restricaoCheck] - Expressão SQL para restrição CHECK
|
|
16
|
+
*/
|
|
17
|
+
export interface AtributoInterface {
|
|
18
|
+
nome: string;
|
|
19
|
+
tipo: string;
|
|
20
|
+
precisao?: number;
|
|
21
|
+
escala?: number;
|
|
22
|
+
tamanho?: number;
|
|
23
|
+
valorPadrao?: any;
|
|
24
|
+
anulavel?: boolean;
|
|
25
|
+
unico?: boolean;
|
|
26
|
+
autoIncremento?: boolean;
|
|
27
|
+
chavePrimaria?: boolean;
|
|
28
|
+
restricaoCheck?: string;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=atributo-interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atributo-interface.d.ts","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/atributo-interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atributo-interface.js","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/atributo-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface que representa uma coluna computada (gerada) no banco de dados.
|
|
3
|
+
*
|
|
4
|
+
* @interface ColunaComputadaInterface
|
|
5
|
+
* @property {string} nome - Nome da coluna computada
|
|
6
|
+
* @property {string} tipo - Tipo da coluna (ex: INTEIRO, TEXTO)
|
|
7
|
+
* @property {string} expressao - Expressao SQL da coluna computada
|
|
8
|
+
* @property {boolean} [persistida] - Se a coluna e armazenada (STORED) ou virtual
|
|
9
|
+
*/
|
|
10
|
+
export interface ColunaComputadaInterface {
|
|
11
|
+
nome: string;
|
|
12
|
+
tipo: string;
|
|
13
|
+
expressao: string;
|
|
14
|
+
persistida?: boolean;
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=coluna-computada-interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coluna-computada-interface.d.ts","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/coluna-computada-interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,wBAAwB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;CACxB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coluna-computada-interface.js","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/coluna-computada-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuração de conexão com banco de dados.
|
|
3
|
+
*/
|
|
4
|
+
export interface ConfiguracaoBancoDados {
|
|
5
|
+
/**
|
|
6
|
+
* Nome único identificador do banco de dados.
|
|
7
|
+
*/
|
|
8
|
+
nome: string;
|
|
9
|
+
/**
|
|
10
|
+
* Tipo de banco de dados.
|
|
11
|
+
*/
|
|
12
|
+
tipo: 'sqlite' | 'postgresql' | 'mysql';
|
|
13
|
+
/**
|
|
14
|
+
* Caminho do arquivo (para SQLite).
|
|
15
|
+
*/
|
|
16
|
+
caminho?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Host do servidor (para PostgreSQL, MySQL).
|
|
19
|
+
*/
|
|
20
|
+
host?: string;
|
|
21
|
+
/**
|
|
22
|
+
* Porta do servidor.
|
|
23
|
+
*/
|
|
24
|
+
porta?: number;
|
|
25
|
+
/**
|
|
26
|
+
* Nome do banco de dados.
|
|
27
|
+
*/
|
|
28
|
+
banco: string;
|
|
29
|
+
/**
|
|
30
|
+
* Usuário para autenticação.
|
|
31
|
+
*/
|
|
32
|
+
usuario?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Senha para autenticação.
|
|
35
|
+
*/
|
|
36
|
+
senha?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Indica se é o banco padrão.
|
|
39
|
+
*/
|
|
40
|
+
padrao?: boolean;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Mapa de configurações de banco de dados.
|
|
44
|
+
*/
|
|
45
|
+
export type ConfiguracoesBancos = {
|
|
46
|
+
[nome: string]: ConfiguracaoBancoDados;
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=configuracao-banco-dados-interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuracao-banco-dados-interface.d.ts","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/configuracao-banco-dados-interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACnC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,EAAE,QAAQ,GAAG,YAAY,GAAG,OAAO,CAAC;IAExC;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,sBAAsB,CAAA;CAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"configuracao-banco-dados-interface.js","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/configuracao-banco-dados-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DescritorTipoClasse, ObjetoDeleguaClasse } from "@designliquido/delegua/interpretador/estruturas";
|
|
2
|
+
import { ColunaEValor, Condicao, Criar } from "@designliquido/lincones-js";
|
|
3
|
+
import { RelacionamentoInterface } from "./relacionamento-interface";
|
|
4
|
+
import { MuitoParaMuitoInterface } from "./muito-para-muitos-interface";
|
|
5
|
+
import { PolimorficInterface } from "./polimorfico-interface";
|
|
6
|
+
import { IndiceInterface } from "./indice-interface";
|
|
7
|
+
import { RestricaoInterface } from "./restricao-interface";
|
|
8
|
+
import { ColunaComputadaInterface } from "./coluna-computada-interface";
|
|
9
|
+
export interface EntidadeInterface {
|
|
10
|
+
modelo: DescritorTipoClasse;
|
|
11
|
+
obterNome(): string;
|
|
12
|
+
obterNomeChavePrimaria(): string;
|
|
13
|
+
obterNomesChavesPrimarias(): string[];
|
|
14
|
+
obterNomesColunas(): string[];
|
|
15
|
+
obterRelacionamentos(): RelacionamentoInterface[];
|
|
16
|
+
obterIndices(): IndiceInterface[];
|
|
17
|
+
obterRestricoes(): RestricaoInterface[];
|
|
18
|
+
obterColunasComputadas(): ColunaComputadaInterface[];
|
|
19
|
+
obterMuitosParaMuitos(): MuitoParaMuitoInterface[];
|
|
20
|
+
obterPolimorficos(): PolimorficInterface[];
|
|
21
|
+
obterNomePropriedadeVersao(): string;
|
|
22
|
+
obterNomeBancoDados(): string;
|
|
23
|
+
obterNomeColunaExclusaoLogica(): string;
|
|
24
|
+
obterNomesColunasPersistentes(): string[];
|
|
25
|
+
possuiCriadoEm(): boolean;
|
|
26
|
+
possuiAtualizadoEm(): boolean;
|
|
27
|
+
possuiExclusaoLogica(): boolean;
|
|
28
|
+
resolverValoresParaColunas(registro: ObjetoDeleguaClasse, colunas: string[]): any[];
|
|
29
|
+
resolverColunasEValores(registro: ObjetoDeleguaClasse, colunas: string[]): ColunaEValor[];
|
|
30
|
+
resolverCondicaoPorChavePrimaria(registro: ObjetoDeleguaClasse): Condicao;
|
|
31
|
+
gerarComandoCriarTabela(): Criar;
|
|
32
|
+
hidratarRegistro(linha: {
|
|
33
|
+
[coluna: string]: any;
|
|
34
|
+
}): ObjetoDeleguaClasse;
|
|
35
|
+
hidratarRegistros(linhas: any[]): ObjetoDeleguaClasse[];
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=entidade-interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entidade-interface.d.ts","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/entidade-interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAC3G,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAE3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,8BAA8B,CAAC;AAExE,MAAM,WAAW,iBAAiB;IAC9B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[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ObjetoDeleguaClasse } from "@designliquido/delegua/interpretador/estruturas";
|
|
2
|
+
export type FuncaoGancho = (registro: ObjetoDeleguaClasse) => void | Promise<void>;
|
|
3
|
+
export type EventoGancho = 'antesDeInserir' | 'aposInserir' | 'antesDeAtualizar' | 'aposAtualizar' | 'antesDeExcluir' | 'aposExcluir';
|
|
4
|
+
export interface GanchosInterface {
|
|
5
|
+
antesDeInserir: FuncaoGancho[];
|
|
6
|
+
aposInserir: FuncaoGancho[];
|
|
7
|
+
antesDeAtualizar: FuncaoGancho[];
|
|
8
|
+
aposAtualizar: FuncaoGancho[];
|
|
9
|
+
antesDeExcluir: FuncaoGancho[];
|
|
10
|
+
aposExcluir: FuncaoGancho[];
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=ganchos.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ganchos.d.ts","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/ganchos.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,iDAAiD,CAAC;AAEtF,MAAM,MAAM,YAAY,GAAG,CAAC,QAAQ,EAAE,mBAAmB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAEnF,MAAM,MAAM,YAAY,GACpB,gBAAgB,GAAG,aAAa,GAChC,kBAAkB,GAAG,eAAe,GACpC,gBAAgB,GAAG,aAAa,CAAC;AAErC,MAAM,WAAW,gBAAgB;IAC7B,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B,WAAW,EAAE,YAAY,EAAE,CAAC;IAC5B,gBAAgB,EAAE,YAAY,EAAE,CAAC;IACjC,aAAa,EAAE,YAAY,EAAE,CAAC;IAC9B,cAAc,EAAE,YAAY,EAAE,CAAC;IAC/B,WAAW,EAAE,YAAY,EAAE,CAAC;CAC/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ganchos.js","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/ganchos.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export * from './analise-n1-interface';
|
|
2
|
+
export * from './atributo-interface';
|
|
3
|
+
export * from './configuracao-banco-dados-interface';
|
|
4
|
+
export * from './entidade-interface';
|
|
5
|
+
export * from './ganchos';
|
|
6
|
+
export * from './indice-interface';
|
|
7
|
+
export * from './coluna-computada-interface';
|
|
8
|
+
export * from './informacao-consulta-interface';
|
|
9
|
+
export * from './muito-para-muitos-interface';
|
|
10
|
+
export * from './opcoes-serializacao-interface';
|
|
11
|
+
export * from './polimorfico-interface';
|
|
12
|
+
export * from './relacionamento-interface';
|
|
13
|
+
export * from './restricao-interface';
|
|
14
|
+
export * from './semente-interface';
|
|
15
|
+
export * from './tabela-interface';
|
|
16
|
+
export * from './transacao-interface';
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC;AACrC,cAAc,sCAAsC,CAAC;AACrD,cAAc,sBAAsB,CAAC;AACrC,cAAc,WAAW,CAAC;AAC1B,cAAc,oBAAoB,CAAC;AACnC,cAAc,8BAA8B,CAAC;AAC7C,cAAc,iCAAiC,CAAC;AAChD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,iCAAiC,CAAC;AAChD,cAAc,yBAAyB,CAAC;AACxC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,uBAAuB,CAAC;AACtC,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
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("./analise-n1-interface"), exports);
|
|
18
|
+
__exportStar(require("./atributo-interface"), exports);
|
|
19
|
+
__exportStar(require("./configuracao-banco-dados-interface"), exports);
|
|
20
|
+
__exportStar(require("./entidade-interface"), exports);
|
|
21
|
+
__exportStar(require("./ganchos"), exports);
|
|
22
|
+
__exportStar(require("./indice-interface"), exports);
|
|
23
|
+
__exportStar(require("./coluna-computada-interface"), exports);
|
|
24
|
+
__exportStar(require("./informacao-consulta-interface"), exports);
|
|
25
|
+
__exportStar(require("./muito-para-muitos-interface"), exports);
|
|
26
|
+
__exportStar(require("./opcoes-serializacao-interface"), exports);
|
|
27
|
+
__exportStar(require("./polimorfico-interface"), exports);
|
|
28
|
+
__exportStar(require("./relacionamento-interface"), exports);
|
|
29
|
+
__exportStar(require("./restricao-interface"), exports);
|
|
30
|
+
__exportStar(require("./semente-interface"), exports);
|
|
31
|
+
__exportStar(require("./tabela-interface"), exports);
|
|
32
|
+
__exportStar(require("./transacao-interface"), exports);
|
|
33
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,yDAAuC;AACvC,uDAAqC;AACrC,uEAAqD;AACrD,uDAAqC;AACrC,4CAA0B;AAC1B,qDAAmC;AACnC,+DAA6C;AAC7C,kEAAgD;AAChD,gEAA8C;AAC9C,kEAAgD;AAChD,0DAAwC;AACxC,6DAA2C;AAC3C,wDAAsC;AACtC,sDAAoC;AACpC,qDAAmC;AACnC,wDAAsC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface que representa um índice de banco de dados.
|
|
3
|
+
*
|
|
4
|
+
* @interface IndiceInterface
|
|
5
|
+
* @property {string} nome - O nome do índice
|
|
6
|
+
* @property {string[]} colunas - As colunas que compõem o índice
|
|
7
|
+
* @property {boolean} unico - Se o índice deve ser único
|
|
8
|
+
* @property {string} [tipo] - O tipo de índice (BTREE, HASH, GIST, GIN)
|
|
9
|
+
*/
|
|
10
|
+
export interface IndiceInterface {
|
|
11
|
+
nome: string;
|
|
12
|
+
colunas: string[];
|
|
13
|
+
unico: boolean;
|
|
14
|
+
tipo?: 'BTREE' | 'HASH' | 'GIST' | 'GIN';
|
|
15
|
+
}
|
|
16
|
+
//# sourceMappingURL=indice-interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indice-interface.d.ts","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/indice-interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,MAAM,WAAW,eAAe;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,KAAK,CAAC;CAC5C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"indice-interface.js","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/indice-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Informações sobre uma consulta executada.
|
|
3
|
+
*/
|
|
4
|
+
export interface InformacaoConsulta {
|
|
5
|
+
sql: string;
|
|
6
|
+
linhaExecucao: Error;
|
|
7
|
+
carimboTempo: Date;
|
|
8
|
+
tempoExecucao: number;
|
|
9
|
+
quantidadeRegistros: number;
|
|
10
|
+
nomeEntidade?: string;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=informacao-consulta-interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"informacao-consulta-interface.d.ts","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/informacao-consulta-interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,EAAE,KAAK,CAAC;IACrB,YAAY,EAAE,IAAI,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"informacao-consulta-interface.js","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/informacao-consulta-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface para relacionamentos muitos-para-muitos (many-to-many).
|
|
3
|
+
* Define a estrutura de uma tabela intermediária e seus relacionamentos.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* ```typescript
|
|
7
|
+
* interface MuitoParaMuitoInterface {
|
|
8
|
+
* tipo: 'muitoParaMuitos';
|
|
9
|
+
* nomePropriedade: 'papeis';
|
|
10
|
+
* entidadeDestino: 'Papel';
|
|
11
|
+
* tabelaIntermediaria: 'usuario_papeis';
|
|
12
|
+
* colunaOrigem: 'usuario_id';
|
|
13
|
+
* colunaDestino: 'papel_id';
|
|
14
|
+
* }
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export interface MuitoParaMuitoInterface {
|
|
18
|
+
/** Tipo de relacionamento */
|
|
19
|
+
tipo: 'muitoParaMuitos';
|
|
20
|
+
/** Nome da propriedade na entidade origem */
|
|
21
|
+
nomePropriedade: string;
|
|
22
|
+
/** Nome da entidade de destino */
|
|
23
|
+
entidadeDestino: string;
|
|
24
|
+
/** Nome da tabela intermediária */
|
|
25
|
+
tabelaIntermediaria: string;
|
|
26
|
+
/** Nome da coluna que referencia a entidade origem */
|
|
27
|
+
colunaOrigem: string;
|
|
28
|
+
/** Nome da coluna que referencia a entidade destino */
|
|
29
|
+
colunaDestino: string;
|
|
30
|
+
/** Se deve deletar a entidade quando remover do relacionamento */
|
|
31
|
+
deletarAoRemover?: boolean;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=muito-para-muitos-interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"muito-para-muitos-interface.d.ts","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/muito-para-muitos-interface.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,uBAAuB;IACpC,6BAA6B;IAC7B,IAAI,EAAE,iBAAiB,CAAC;IAExB,6CAA6C;IAC7C,eAAe,EAAE,MAAM,CAAC;IAExB,kCAAkC;IAClC,eAAe,EAAE,MAAM,CAAC;IAExB,mCAAmC;IACnC,mBAAmB,EAAE,MAAM,CAAC;IAE5B,sDAAsD;IACtD,YAAY,EAAE,MAAM,CAAC;IAErB,uDAAuD;IACvD,aAAa,EAAE,MAAM,CAAC;IAEtB,kEAAkE;IAClE,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"muito-para-muitos-interface.js","sourceRoot":"","sources":["../../../fontes/interfaces-tipos/muito-para-muitos-interface.ts"],"names":[],"mappings":""}
|