- Supports comments - more efficient as it scans the text block instead of repeatedly searching throught the whole block - type matching based on catalog (but need to add aliases manually) - added many keywords todo: - heap corruption bug - symbol stops at special char like parenthese or operator or something similar.
31 lines
621 B
C++
31 lines
621 B
C++
#ifndef PGSQLDATABASECATALOGUE_H
|
|
#define PGSQLDATABASECATALOGUE_H
|
|
|
|
#include <vector>
|
|
|
|
namespace Pgsql {
|
|
|
|
class Connection;
|
|
|
|
}
|
|
|
|
class PgTypeContainer;
|
|
|
|
class PgsqlDatabaseCatalogue {
|
|
public:
|
|
PgsqlDatabaseCatalogue();
|
|
PgsqlDatabaseCatalogue(const PgsqlDatabaseCatalogue&) = delete;
|
|
PgsqlDatabaseCatalogue& operator = (const PgsqlDatabaseCatalogue&) = delete;
|
|
|
|
~PgsqlDatabaseCatalogue();
|
|
|
|
|
|
void loadAll(Pgsql::Connection &conn);
|
|
void loadTypes(Pgsql::Connection &conn);
|
|
|
|
const PgTypeContainer* types() const { return m_types; }
|
|
private:
|
|
PgTypeContainer *m_types = nullptr;
|
|
};
|
|
|
|
#endif // PGSQLDATABASECATALOGUE_H
|