alexfu / SQLiteQueryBuilder

A library that provides a simple API for building SQLite query statements in Java.
MIT License
70 stars 21 forks source link

Foreign keys #46

Closed bbrakenhoff closed 8 years ago

bbrakenhoff commented 8 years ago

Would it be possible to create a feature to create foreign keys to other tables?

alexfu commented 8 years ago

@bbrakenhoff could you elaborate more on this?

bbrakenhoff commented 8 years ago

Yes :). I found out that there is ColumnConstraint for this, though I cannot find out how to refer to the column of the other table I'm referring to. Maybe I should make an other issue for this, but I also could not figure out to use a join and an order by clause... It seems impossible to chain these two.

alexfu commented 8 years ago

@bbrakenhoff ah, yes. I will be sure to include REFERENCES as part of the FOREIGN KEY constraint in the next release.

shadeven commented 8 years ago

@alexfu I would like to work on this new feature if you don't mind. Thanks.

alexfu commented 8 years ago

Resolved in #47