WORM 0.2
A C++ DAL/ORM code generation framework
Namespaces | Enumerations | Functions | Variables

src/sql/wsqldatatype.h File Reference

#include <string>
#include <boost/algorithm/string.hpp>
#include <iostream>

Go to the source code of this file.

Namespaces

namespace  WSql
namespace  WSql::WSqlDataType
 

WSqlDataType namespace - Utilities and definitions of supported data types.


Enumerations

enum  WSql::WSqlDataType::Type {
  WSql::WSqlDataType::NOTYPE = 0, WSql::WSqlDataType::TINYINT, WSql::WSqlDataType::SMALLINT, WSql::WSqlDataType::MEDIUMINT,
  WSql::WSqlDataType::INT, WSql::WSqlDataType::BIGINT, WSql::WSqlDataType::FLOAT, WSql::WSqlDataType::DOUBLE,
  WSql::WSqlDataType::DECIMAL, WSql::WSqlDataType::DATE, WSql::WSqlDataType::DATETIME, WSql::WSqlDataType::YEAR,
  WSql::WSqlDataType::TIME, WSql::WSqlDataType::TIMESTAMP, WSql::WSqlDataType::TIMESTAMPTZ, WSql::WSqlDataType::CHAR,
  WSql::WSqlDataType::VARCHAR, WSql::WSqlDataType::NCHAR, WSql::WSqlDataType::NVARCHAR, WSql::WSqlDataType::TEXT,
  WSql::WSqlDataType::TINYTEXT, WSql::WSqlDataType::MEDIUMTEXT, WSql::WSqlDataType::LONGTEXT, WSql::WSqlDataType::ENUM,
  WSql::WSqlDataType::SET, WSql::WSqlDataType::BLOB
}

Functions

static std::string WSql::WSqlDataType::toString (Type type)
 Covenience function - returns a string for the type.
static Type WSql::WSqlDataType::toType (std::string name)
 Convenience function - translates a string to a type flag.
static std::string WSql::WSqlDataType::toSingular (const std::string &name)
 Attempt to return a singularized form of name.
static std::string WSql::WSqlDataType::toPlural (const std::string &name)
 Attempt to return a pluralized form of name.
static std::string WSql::WSqlDataType::columnNameToVariable (const std::string &columnname)
 Returns a suitable variable name transformed from columnname.
static std::string WSql::WSqlDataType::tableNameToClass (const std::string &tablename)
 Returns a transformed table name as a class name.

Variables

static const char *const WSql::WSqlDataType::TypeNames []
static const unsigned short WSql::WSqlDataType::number_of_datatypes = 26
 Number of types supported.
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Defines