Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move SelectQueryable to Dialect module #3856

Merged
merged 1 commit into from
Jan 30, 2023
Merged

Move SelectQueryable to Dialect module #3856

merged 1 commit into from
Jan 30, 2023

Conversation

hfhbd
Copy link
Collaborator

@hfhbd hfhbd commented Jan 26, 2023

Use-case:
Implement QueryWithResults defined in dialect module in the DB2 dialect but I also need to create SelectQueryable

override fun queryWithResults(sqlStmt: SqlStmt): QueryWithResults? {
  val ext = sqlStmt.extensionStmt
  if (ext != null) {
    val set = (ext as Db2ExtensionStmt).setStmt
    set.compoundSelectStmtInternal?.let { SelectQueryable(it) }
    return Db2SetQueryWithResults(set)
  }
  val compoundSelectStmt = sqlStmt.compoundSelectStmt
  return if (compoundSelectStmt is Db2CompoundSelectMixin) {
    return compoundSelectStmt.queryWithResults()
  } else parentResolver.queryWithResults(sqlStmt)
}

@hfhbd hfhbd self-assigned this Jan 26, 2023
@AlecKazakova AlecKazakova merged commit f7af212 into master Jan 30, 2023
@AlecKazakova AlecKazakova deleted the hfhbd/dialect branch January 30, 2023 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants