Skip to content

Instantly share code, notes, and snippets.

@MWhyte
Last active November 28, 2022 22:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MWhyte/090889197ec81a85c97273464eb83187 to your computer and use it in GitHub Desktop.
Save MWhyte/090889197ec81a85c97273464eb83187 to your computer and use it in GitHub Desktop.
JOOQ Cheat Sheet
List<StaffRecord> staffRecords = context
.select()
.from(STAFF)
.fetchInto(StaffRecord.class);
Result<Record> fetch = context
.select()
.from(STAFF)
.fetch();
List<StaffRecord> staffRecords = context
.select()
.from(STAFF)
.where(STAFF.FIRST_NAME.eq("Mike"))
.and(STAFF.LAST_NAME.eq("Hillyer"))
.fetchInto(StaffRecord.class);
List<StaffRecord> staffRecords = context
.select()
.from(STAFF)
.where(STAFF.FIRST_NAME.eq("Mike"))
.andNot(STAFF.FIRST_NAME.eq("Jon"))
.fetchInto(StaffRecord.class);
List<StaffRecord> staffRecords = context
.select()
.from(STAFF)
.where(STAFF.FIRST_NAME.eq("Mike"))
.or(STAFF.FIRST_NAME.eq("Jon"))
.fetchInto(StaffRecord.class);
List<StaffRecord> staffRecords = context
.select()
.from(STAFF)
.where(STAFF.LAST_NAME.eq("Hillyer"))
.fetchInto(StaffRecord.class);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment