public class Schema extends Object
Schema
class can be used to generate SQL to
create tables, sequences, and constraints described by
KeylessDaoDescriptor
objects.
The SQL generated by default is probably not ideal. It uses lowest-common
denominator types like "text" and "integer" and databases have more
precise types that should probably be preferred. If you are going
to use generated schema, make sure to create your DAO builders
making use of the notNull()
,
setSqlTypeName()
, and withUniqueConstraint()
methods as appropriate.
Constructor and Description |
---|
Schema(KeylessDaoDescriptor... descriptors)
Construct an instance.
|
Modifier and Type | Method and Description |
---|---|
List<String> |
constraints()
All the constraints this schema contains.
|
List<String> |
sequences()
All the sequences this schema contains.
|
String |
sql()
The SQL to create the schema described by this object.
|
List<String> |
tables()
All the tables this schema contains.
|
public Schema(KeylessDaoDescriptor... descriptors)
descriptors
- The DaoDescriptor
objects to generate SQL for.public List<String> constraints()
public List<String> sequences()
public List<String> tables()
public String sql()
Copyright © 2019. All rights reserved.