2020-12-01 23:37:10 +01:00
|
|
|
#ifndef MYSQL_TABLE_BUILDER_H
|
|
|
|
#define MYSQL_TABLE_BUILDER_H
|
|
|
|
|
2021-11-01 17:49:10 +01:00
|
|
|
#include "core/string.h"
|
2020-12-01 23:37:10 +01:00
|
|
|
|
2021-05-15 13:54:28 +02:00
|
|
|
#include "core/database/table_builder.h"
|
2020-12-01 23:37:10 +01:00
|
|
|
|
|
|
|
class MysqlTableBuilder : public TableBuilder {
|
|
|
|
public:
|
2021-11-01 17:49:10 +01:00
|
|
|
TableBuilder *create_table(const String &name);
|
|
|
|
TableBuilder *integer(const String &name);
|
|
|
|
TableBuilder *date(const String &name);
|
|
|
|
TableBuilder *varchar(const String &name, const int length);
|
2020-12-01 23:37:10 +01:00
|
|
|
TableBuilder *not_null();
|
|
|
|
TableBuilder *null();
|
|
|
|
TableBuilder *auto_increment();
|
2021-11-01 17:49:10 +01:00
|
|
|
TableBuilder *primary_key(const String &name);
|
2020-12-01 23:37:10 +01:00
|
|
|
TableBuilder *primary_key();
|
|
|
|
TableBuilder *next_row();
|
|
|
|
|
2021-11-01 17:49:10 +01:00
|
|
|
TableBuilder *drop_table(const String &name);
|
2020-12-02 00:49:17 +01:00
|
|
|
|
2020-12-01 23:37:10 +01:00
|
|
|
MysqlTableBuilder();
|
|
|
|
virtual ~MysqlTableBuilder();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|