akarshan2701 / h2database

Automatically exported from code.google.com/p/h2database
0 stars 0 forks source link

Using JaQu with mysql #46

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When using a java class with a String and using JaQu, the sql for the
CREATE is off as it produces a VARCHAR instead of VARCHAR(30) [pick your
length) 

Original issue reported on code.google.com by milhous...@gmail.com on 2 Dec 2008 at 7:03

GoogleCodeExporter commented 8 years ago
The next version will support maxLength(column, l) as in:

public class Product implements Table {
    public Integer productId;
    public String category;
    public void define() {
        primaryKey(productId);
        maxLength(category, 255);
    }
}

But you need to explicitly define it. Would that work for you? In theory, JaQu 
could
use a big value by default, for example 65535. But the problem is the maximum 
VARCHAR
size depends on the database, and sometimes database version.

Original comment by thomas.t...@gmail.com on 2 Dec 2008 at 9:03

GoogleCodeExporter commented 8 years ago

Original comment by thomas.t...@gmail.com on 2 Dec 2008 at 9:03

GoogleCodeExporter commented 8 years ago
The maxLength looks like a good fix(for now).  I would be interested in
writing/contributing code.  I am mostly interested in making sure that mysql 
works,
but as long as it produces standard SQL that would be great.

Original comment by milhous...@gmail.com on 2 Dec 2008 at 9:31

GoogleCodeExporter commented 8 years ago
> I would be interested in writing/contributing code.

That would be great! I suggest you start by providing patches. See:
http://www.h2database.com/html/build.html#providing_patches

Original comment by thomas.t...@gmail.com on 4 Dec 2008 at 7:21

GoogleCodeExporter commented 8 years ago
This is implemented in version 1.1.105

Original comment by thomas.t...@gmail.com on 19 Dec 2008 at 3:02