mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-10-23 21:15:52 +00:00
#1176 - Allow script in extra-ddl.xml ... to not have trailing semi-colon
This commit is contained in:
@@ -30,7 +30,13 @@ public class ExtraDdlXmlReader {
|
||||
for (DdlScript script : read.getDdlScript()) {
|
||||
if (matchPlatform(platformName, script.getPlatforms())) {
|
||||
logger.debug("include script {}", script.getName());
|
||||
sb.append(script.getValue()).append("\n");
|
||||
String value = script.getValue();
|
||||
sb.append(value);
|
||||
if (value.lastIndexOf(';') == -1) {
|
||||
// add statement terminator as we didn't find one
|
||||
sb.append(";");
|
||||
}
|
||||
sb.append("\n");
|
||||
}
|
||||
}
|
||||
return sb.toString();
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
select d.order_id, sum(d.order_qty * d.unit_price) as order_total,
|
||||
sum(d.ship_qty * d.unit_price) as ship_total
|
||||
from o_order_detail d
|
||||
group by d.order_id;
|
||||
group by d.order_id
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
select d.order_id, sum(d.order_qty * d.unit_price) as order_total,
|
||||
sum(d.ship_qty * d.unit_price) as ship_total
|
||||
from o_order_detail d
|
||||
group by d.order_id;
|
||||
group by d.order_id
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
select d.order_id, sum(d.order_qty * d.unit_price) as order_total,
|
||||
sum(d.ship_qty * d.unit_price) as ship_total
|
||||
from o_order_detail d
|
||||
group by d.order_id;
|
||||
group by d.order_id
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
select d.order_id, sum(d.order_qty * d.unit_price) as order_total,
|
||||
sum(d.ship_qty * d.unit_price) as ship_total
|
||||
from o_order_detail d
|
||||
group by d.order_id;
|
||||
group by d.order_id
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
select d.order_id, sum(d.order_qty * d.unit_price) as order_total,
|
||||
sum(d.ship_qty * d.unit_price) as ship_total
|
||||
from o_order_detail d
|
||||
group by d.order_id;
|
||||
group by d.order_id
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
select d.order_id, sum(d.order_qty * d.unit_price) as order_total,
|
||||
sum(d.ship_qty * d.unit_price) as ship_total
|
||||
from o_order_detail d
|
||||
group by d.order_id;
|
||||
group by d.order_id
|
||||
</ddl-script>
|
||||
|
||||
<ddl-script name="order views hsqldb" platforms="hsqldb">
|
||||
|
||||
Reference in New Issue
Block a user