evd2sql
(since EVL 2.6)
Read the EVL data definition (a.k.a. EVD) from standart input or <table.evd>
and write to
standard output or to <table.sql>
‘CREATE TABLE’ statement specific for PostreSQL.
Synopsis
evd2sql [-i|--input <table.evd>] [-o|--output <table.sql>] [-s|--sql-dialect <database>] [-t|--table <table_name>] [--if-not-exists] [--varchar <length>] [-v|--verbose] evd2sql ( --help | --usage | --version )
Options
- --if-not-exists
-
use ‘CREATE TABLE IF NOT EXISTS’
- -i, --input=<table.evd>
-
write output into file
<table.evd>
instead of standard output - -o, --output=<table.sql>
-
write output into file
<table.sql>
instead of standard output - -s, --sql-dialect=<database>
-
currently these databases are supported:
ansi (default) postgres
- -t, --table=<table_name>
-
by default basename of
<table.evd>
from ‘--input’ option is used as table name in ‘CREATE TABLE’ statement, this option can overwrite it. When reading EVD from standard input, this option is recomended, otherwise table name will be empty - --varchar=<length>
-
specify the default VARCHAR length, default is 256
- -v, --verbose
-
print to STDERR info/debug messages
- --help
-
print this help and exit
- --usage
-
print short usage information and exit
- --version
-
print version and exit
Examples
- Having an EVD file ‘some.evd’:
id int null="" sep=";" started date null="" sep=";" value string null="" sep="\n"
This command:
evd2sql -s postgres some.evd
will produce:
id integer started date value varchar(256)