Can I combine an existing exposed query and a native query? Like:
`val query = PersonTable.select { PersonTable.name eq "Napoleon" }
query + "and surname = 'Bonapart'"`
Other than filtering at the code level, nothing comes up
Can I combine an existing exposed query and a native query? Like:
`val query = PersonTable.select { PersonTable.name eq "Napoleon" }
query + "and surname = 'Bonapart'"`
Other than filtering at the code level, nothing comes up
Yes, using
and&orbut have in mind that it may result in fetching more data than necessary from the database, so it's often better to try to express your conditions using Exposed queries if possible.If you want to mix native SQL queries with Exposed queries, you might need to execute them separately and then combine the results at the code level.