Package | Description |
---|---|
net.aditsu.depeche |
Modifier and Type | Class and Description |
---|---|
class |
MutableFKey
Foreign key details that can be created from scratch and modified
|
Modifier and Type | Method and Description |
---|---|
FKey |
TableInfo.getExpKey(String name)
Returns the exported key with the given name;
it throws an exception if there are zero or multiple such exported keys
|
FKey |
TableInfo.getExpKey(Table t)
Returns the exported key that references the given table;
it throws an exception if there are zero or multiple such exported keys
|
FKey |
Column.getFKey()
Returns the foreign key that contains this column (if it exists and is unique)
|
FKey |
Field.getFKey()
Returns the foreign key that contains this field's column (if it exists and is unique)
|
FKey |
TableInfo.getFKey(String name)
Returns the foreign key with the given name;
it throws an exception if there is no such foreign key
|
FKey |
TableInfo.getFKey(Table t)
Returns the foreign key that references the given table;
it throws an exception if there are zero or multiple such foreign keys
|
Modifier and Type | Method and Description |
---|---|
Map<ExpKey,FKey> |
TableInfo.getExpKeys()
Returns this table's exported keys mapped by their fk table and name
|
Map<String,FKey> |
TableInfo.getFKeys()
Returns this table's foreign keys mapped by their name
|
Modifier and Type | Method and Description |
---|---|
void |
MutableTableInfo.addExpKey(FKey expkey) |
void |
Provider.addFKey(FKey fk)
Adds a foreign key constraint
|
void |
MutableTableInfo.addFKey(FKey fkey) |
void |
Provider.addFKey(FKey fk,
Conn conn)
Adds a foreign key constraint, using a given connection
|
void |
Provider.dropFKey(FKey fk)
Drops a foreign key constraint
|
void |
Provider.dropFKey(FKey fk,
Conn conn)
Drops a foreign key constraint, using a given connection
|
String |
Provider.getAddFKeySQL(FKey fk)
Returns an SQL command for adding a foreign key constraint
|
Query |
Record.getChildren(FKey expkey)
Returns a query for getting the child records linked from this one through an exported key
|
String |
Provider.getDropFKeySQL(FKey fk)
Returns an SQL command for dropping a foreign key constraint
|
String |
MySQLProvider.getDropFKeySQL(FKey fk) |
Query |
Record.getParent(FKey fkey)
Returns a query for getting the parent record linked from this one through a foreign key
|
Query |
Query.joinParent(FKey fk)
Adds an inner join with a parent table, linked through the given foreign key
|
Query |
Query.joinParent(JoinType type,
FKey fk)
Adds a join of a given type, with a parent table, linked through the given foreign key
|
Query |
Query.leftJoinParent(FKey fk)
Adds a left join with a parent table, linked through the given foreign key
|
void |
Record.setParent(FKey fkey,
Record rec)
Sets the parent record linked from this one through a foreign key
|