/
yuddzy
/
sqlite
Обзор
Документация
Войти
/
yuddzy
/
sqlite
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/types.h
58 строк
1 KB
yuddzy
Реализация новых функций
22 ноя 2025, 04:56
22 ноя 2025, 04:56
dfafc2e
Код
Авторство
О чём код?
#pragma once #define _CRT_SECURE_NO_WARNINGS #ifndef NOMINMAX #define NOMINMAX #endif #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif #include <iostream> #include <fstream> #include <stdlib.h> #include <string> #include <algorithm> #include <cstdint> #include <vector> using namespace std; enum class All_types { BIT = 0, TINYINT = 1, SMALLINT = 2, INT_TYPE = 3, BIGINT = 4, FLOAT_TYPE = 5, REAL = 6, DATETIME = 7, SMALLDATETIME = 8, DATE_TYPE = 9, TIME = 10, CHAR_TYPE = 11, VARCHAR = 12, TEXT = 13 }; struct Column { string name; All_types type = All_types::INT_TYPE; int size = 0; }; struct data_list_node { All_types type; int size; struct data_list_node* next; }; typedef struct data_list_node data_node; data_node* init(All_types type, int size); data_node* append(data_node* root, All_types type, int size); void destroy(data_node* root); int get_type_size(All_types column, int size = -1); All_types get_type_from_string(const string& type_str); int get_varchar_size(const string& type_str);