Parse SQL field definition string

In Progress

I need Java source code for a function that can take a string that is assumed to be a single field definition from a SQL DDL create table statement and return a java object with the following information parsed from the DDL for the field.:

1) the data type as a string (i.e. 'char', 'varchar', 'text'. 'int', 'integer', 'bigint', etc., etc.)

2) the size as an integer when applicable, null if not applications. For example, if the data type is a char then how many characters is it defined to be? If the data type is a float then how many bytes is it defined to be. (note, if the size is not explicitly defined in the DDL then this can be null)

3) a string containing any DDL about the field other than it's type and size. For example, DDL for nullability, defaults, foreign key, etc. should all be returned as a string that could be post fixed to the type and size definition if the DDL for the field were to be recreated.

4) a Boolean set to false if the field allows null values and true if it does not (false should returned if not explicitly stated in the DDL)

5) a string containing the "Default" value if one is defined. NULL if no default is defined.

The function should also accept a "dialect" indicator as a string with at least the following possible values:

1) "MSSQL"

2) "Access"

3) "MySQL"

4) "SQLite"

5) "PSQL"

Where the dialiect code correspond to:

1) "MSSQL" - Microsoft SQL Server T-SQL

2) "Access"- Microsoft Access

3) "MySQL" - MySQL

4) "SQLite" - SQLite

5) "PSQL" - Postgres SQL

The function must properly parse at least each of the 5 dialects listed.

Skills: Java, SQL

See more: to string, text to string, string the, string source code java, string i, string 2, it field, int size c, how to string, parse sql string java, t-sql with, t-sql in, sql microsoft access, microsoft access sql, boolean sql server, t-sql;, sql microsoft, sql java, Sql 2012, postgres, parse, parse and, parse a string, Microsoft SQL server, Java SQL

About the Employer:
( 1 review ) Havre de Grace, United States

Project ID: #2479297

Awarded to:


Hi, I am an experienced Java/ J2EE and SQL developer. Please check my work history. looking forward to working with you.

$30 USD in 3 days
(17 Reviews)

11 freelancers are bidding on average $35 for this job


I am the best Java Programmer on this site. I offer you my services.

$40 USD in 1 day
(330 Reviews)

I am ready to start the work.

$40 USD in 2 days
(26 Reviews)

hi i can do this contact if interested

$40 USD in 7 days
(21 Reviews)

Hello, Ready to start right now.

$40 USD in 2 days
(5 Reviews)

Dear Sir, I'm interested about your offer. I'm a Java/JEE and Android developer with 5 years experience, graduated from the best engineering school in Tunisia. I have participated in many complex projects based o More

$30 USD in 2 days
(2 Reviews)

Hi, I have hands on experience in JDBC, java. Have done a full course on Database Management Systems. I have also implemented a full Geographical Information System, using backend Mysql database. I have read your probl More

$40 USD in 1 day
(3 Reviews)

Sounds like a pretty easy task.

$30 USD in 1 day
(0 Reviews)

I can do it in few hours with complete testing of DDL for different dialects.

$40 USD in 1 day
(0 Reviews)

Can do that very easily.

$30 USD in 1 day
(0 Reviews)

I am ready to start. Contact me asap.

$30 USD in 5 days
(0 Reviews)