Fields -- create the fields part of a create table script
#
# SYNOPSIS
# ========
# my $json = from_json( qq (
# {
# "fields": {
# "userid": "varchar",
#
plates'
# );
#
# my $fields = GenerateSQL::Sql::Table::Fields->new(
# json => $json,
# template => $template,
# );
#
# $fields->create_fields();
#
fields->sql;
#
# METHODS
# =======
# create_fields() Create the SQL for field creation from JSON
# get_defaults($datatype) Get defaults part for the sql datatype
#
#
#
class Daje::Generat
TABLE users;
DROP TABLE company_type;
DROP TABLE companies;
DROP TABLE companies_users;
@@ users.json
{
"tables": [
{
"table": {
"name": "users",