-
Notifications
You must be signed in to change notification settings - Fork 0
/
tabla.hh
65 lines (43 loc) · 1.9 KB
/
tabla.hh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#include "columna.hh"
#ifndef TABLA_HH
#define TABLA_HH
typedef struct _strTabla *Tabla;
Tabla crearTabla(const char *nombreTabla);
// Crea una tabla
void agregarTabla(Tabla &listaTb, const char *nombreTabla);
// Agrega una tabla a la lista de tablas tb
bool existeTabla(Tabla listaTb, const char *nombreTabla);
// Retorna true si la tabla existe, false si no existe
Tabla obtenerTabla(Tabla listaTb, const char *nombreTabla);
// Obtiene una tabla de la lista de tablas tb
bool existeColTabla(Tabla tb, const char *nombreCol);
// Retorna true si la columna existe en la tabla tb, false si no
void agregarColTabla(Tabla tb, const char *nombreCol, bool esEntero);
// Agrega una columna a la tabla tb
Columna obtenerListaCol(Tabla tb);
// Retorna la lista de columnas de una tabla
Tabla obtenerMinimo(Tabla arbolTb);
// Retona el arbol menor
void eliminarTabla(Tabla &listaTb, char *nombreTabla);
// Elimina una tabla
void eliminarTodasTablas(Tabla &listaTb);
// Elimina todas las tablas
void eliminarColTabla(Tabla &tb, Columna &listaCol, char *nombreCol);
// Elimina una columna en la tabla
void copiarColumnasTabla(Columna lcTabla, Tabla &nueva);
// Copia las columnas a una tabla
void copiarTuplasTabla(Columna lcTabla, Tabla &nueva, char operador, char *strArray[]);
// Copia las tuplas a la tabla
void tuplasTabla(Columna lcTabla, Tabla &nueva);
// Copia todas las tuplas a la tabla
void agregarColEspecificas(Tabla &nueva, Columna lcTabla, char *strArray[], int cantCols);
// Agrega las columnas especificadas
void agregarDatosTabla(Tabla &nueva, Columna lcTabla, char *strArray[], int cantCols);
// Agrega los datos a la tabla
void imprimirTablasOrd(Tabla arbolTb);
// Imprime todas las tablas
void insertarModificadas(char *nombreTabla, char *modificadas[], int pos);
// Inserta las tablas modificadas
void checkModificadas(char *nombreTabla, char *modificadas[]);
// Si existe la tabla ya modificada la borra
#endif