Skip to content
Snippets Groups Projects
Commit 9e47b371 authored by npedot's avatar npedot
Browse files

adds select limit parameter

parent 48575793
No related branches found
No related tags found
No related merge requests found
package unibz.cs.semint.kprime.domain.dql
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlProperty
import com.fasterxml.jackson.dataformat.xml.annotation.JacksonXmlRootElement
@JacksonXmlRootElement(localName = "select")
......@@ -8,5 +9,7 @@ class Select {
var attributes = ArrayList<Attribute>()
var from = ArrayList<From>()
var where = Where()
@JacksonXmlProperty(isAttribute = true)
var limit : String? = null
}
\ No newline at end of file
......@@ -46,7 +46,7 @@ class SQLizeSelectUseCase {
if (!select.where.condition.isEmpty()) {
sql += "WHERE ${select.where.condition}" //+ System.lineSeparator()
}
sql += " LIMIT 10" //+ System.lineSeparator()
sql += if (select.limit!=null) " LIMIT "+select.limit else " LIMIT 10" //+ System.lineSeparator()
return sql
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment