Skip to content

Commit

Permalink
Merge branch 'main' into feature/templated-distributions
Browse files Browse the repository at this point in the history
  • Loading branch information
ETHenzlere authored Mar 20, 2024
2 parents 9bb153f + ed8ef3a commit 7154f6e
Show file tree
Hide file tree
Showing 8 changed files with 44 additions and 43 deletions.
16 changes: 8 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<dependency>
<groupId>org.xerial</groupId>
<artifactId>sqlite-jdbc</artifactId>
<version>3.42.0.0</version>
<version>3.45.2.0</version>
</dependency>
</dependencies>
</profile>
Expand All @@ -83,7 +83,7 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.2</version>
<version>42.7.3</version>
<scope>runtime</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -185,7 +185,7 @@
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.2</version>
<version>42.7.3</version>
<scope>runtime</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -249,7 +249,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-configuration2</artifactId>
<version>2.9.0</version>
<version>2.10.0</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -305,7 +305,7 @@
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>4.0.1</version>
<version>4.0.2</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -358,7 +358,7 @@
<!-- format/check code via google style format -->
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.22.1</version>
<version>2.23</version>
<executions>
<execution>
<goals>
Expand All @@ -371,7 +371,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.12.1</version>
<version>3.13.0</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
Expand Down Expand Up @@ -426,7 +426,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.7.0</version>
<version>3.7.1</version>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<finalName>${project.artifactId}-${classifier}</finalName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ private CustomClassLoader loadQueryTemplates(String file) {
ParsedQueryTemplate qt = b.build();
// Create and compile class.
final String s =
"""
"""
package %s ;
import %s ;
public final class %s extends %s {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class Delivery extends TPCCProcedure {

public SQLStmt delivGetOrderIdSQL =
new SQLStmt(
"""
"""
SELECT NO_O_ID FROM %s
WHERE NO_D_ID = ?
AND NO_W_ID = ?
Expand All @@ -45,7 +45,7 @@ public class Delivery extends TPCCProcedure {

public SQLStmt delivDeleteNewOrderSQL =
new SQLStmt(
"""
"""
DELETE FROM %s
WHERE NO_O_ID = ?
AND NO_D_ID = ?
Expand All @@ -55,7 +55,7 @@ public class Delivery extends TPCCProcedure {

public SQLStmt delivGetCustIdSQL =
new SQLStmt(
"""
"""
SELECT O_C_ID FROM %s
WHERE O_ID = ?
AND O_D_ID = ?
Expand All @@ -65,7 +65,7 @@ public class Delivery extends TPCCProcedure {

public SQLStmt delivUpdateCarrierIdSQL =
new SQLStmt(
"""
"""
UPDATE %s
SET O_CARRIER_ID = ?
WHERE O_ID = ?
Expand All @@ -76,7 +76,7 @@ public class Delivery extends TPCCProcedure {

public SQLStmt delivUpdateDeliveryDateSQL =
new SQLStmt(
"""
"""
UPDATE %s
SET OL_DELIVERY_D = ?
WHERE OL_O_ID = ?
Expand All @@ -87,7 +87,7 @@ public class Delivery extends TPCCProcedure {

public SQLStmt delivSumOrderAmountSQL =
new SQLStmt(
"""
"""
SELECT SUM(OL_AMOUNT) AS OL_TOTAL
FROM %s
WHERE OL_O_ID = ?
Expand All @@ -98,7 +98,7 @@ SELECT SUM(OL_AMOUNT) AS OL_TOTAL

public SQLStmt delivUpdateCustBalDelivCntSQL =
new SQLStmt(
"""
"""
UPDATE %s
SET C_BALANCE = C_BALANCE + ?,
C_DELIVERY_CNT = C_DELIVERY_CNT + 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtGetCustSQL =
new SQLStmt(
"""
"""
SELECT C_DISCOUNT, C_LAST, C_CREDIT
FROM %s
WHERE C_W_ID = ?
Expand All @@ -45,7 +45,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtGetWhseSQL =
new SQLStmt(
"""
"""
SELECT W_TAX
FROM %s
WHERE W_ID = ?
Expand All @@ -54,7 +54,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtGetDistSQL =
new SQLStmt(
"""
"""
SELECT D_NEXT_O_ID, D_TAX
FROM %s
WHERE D_W_ID = ? AND D_ID = ? FOR UPDATE
Expand All @@ -63,7 +63,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtInsertNewOrderSQL =
new SQLStmt(
"""
"""
INSERT INTO %s
(NO_O_ID, NO_D_ID, NO_W_ID)
VALUES ( ?, ?, ?)
Expand All @@ -72,7 +72,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtUpdateDistSQL =
new SQLStmt(
"""
"""
UPDATE %s
SET D_NEXT_O_ID = D_NEXT_O_ID + 1
WHERE D_W_ID = ?
Expand All @@ -82,7 +82,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtInsertOOrderSQL =
new SQLStmt(
"""
"""
INSERT INTO %s
(O_ID, O_D_ID, O_W_ID, O_C_ID, O_ENTRY_D, O_OL_CNT, O_ALL_LOCAL)
VALUES (?, ?, ?, ?, ?, ?, ?)
Expand All @@ -91,7 +91,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtGetItemSQL =
new SQLStmt(
"""
"""
SELECT I_PRICE, I_NAME , I_DATA
FROM %s
WHERE I_ID = ?
Expand All @@ -100,7 +100,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtGetStockSQL =
new SQLStmt(
"""
"""
SELECT S_QUANTITY, S_DATA, S_DIST_01, S_DIST_02, S_DIST_03, S_DIST_04, S_DIST_05,
S_DIST_06, S_DIST_07, S_DIST_08, S_DIST_09, S_DIST_10
FROM %s
Expand All @@ -111,7 +111,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtUpdateStockSQL =
new SQLStmt(
"""
"""
UPDATE %s
SET S_QUANTITY = ? ,
S_YTD = S_YTD + ?,
Expand All @@ -124,7 +124,7 @@ public class NewOrder extends TPCCProcedure {

public final SQLStmt stmtInsertOrderLineSQL =
new SQLStmt(
"""
"""
INSERT INTO %s
(OL_O_ID, OL_D_ID, OL_W_ID, OL_NUMBER, OL_I_ID, OL_SUPPLY_W_ID, OL_QUANTITY, OL_AMOUNT, OL_DIST_INFO)
VALUES (?,?,?,?,?,?,?,?,?)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class OrderStatus extends TPCCProcedure {

public SQLStmt ordStatGetNewestOrdSQL =
new SQLStmt(
"""
"""
SELECT O_ID, O_CARRIER_ID, O_ENTRY_D
FROM %s
WHERE O_W_ID = ?
Expand All @@ -51,7 +51,7 @@ public class OrderStatus extends TPCCProcedure {

public SQLStmt ordStatGetOrderLinesSQL =
new SQLStmt(
"""
"""
SELECT OL_I_ID, OL_SUPPLY_W_ID, OL_QUANTITY, OL_AMOUNT, OL_DELIVERY_D
FROM %s
WHERE OL_O_ID = ?
Expand All @@ -62,7 +62,7 @@ public class OrderStatus extends TPCCProcedure {

public SQLStmt payGetCustSQL =
new SQLStmt(
"""
"""
SELECT C_FIRST, C_MIDDLE, C_LAST, C_STREET_1, C_STREET_2,
C_CITY, C_STATE, C_ZIP, C_PHONE, C_CREDIT, C_CREDIT_LIM,
C_DISCOUNT, C_BALANCE, C_YTD_PAYMENT, C_PAYMENT_CNT, C_SINCE
Expand All @@ -75,7 +75,7 @@ public class OrderStatus extends TPCCProcedure {

public SQLStmt customerByNameSQL =
new SQLStmt(
"""
"""
SELECT C_FIRST, C_MIDDLE, C_ID, C_STREET_1, C_STREET_2, C_CITY,
C_STATE, C_ZIP, C_PHONE, C_CREDIT, C_CREDIT_LIM, C_DISCOUNT,
C_BALANCE, C_YTD_PAYMENT, C_PAYMENT_CNT, C_SINCE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class Payment extends TPCCProcedure {

public SQLStmt payUpdateWhseSQL =
new SQLStmt(
"""
"""
UPDATE %s
SET W_YTD = W_YTD + ?
WHERE W_ID = ?
Expand All @@ -47,7 +47,7 @@ public class Payment extends TPCCProcedure {

public SQLStmt payGetWhseSQL =
new SQLStmt(
"""
"""
SELECT W_STREET_1, W_STREET_2, W_CITY, W_STATE, W_ZIP, W_NAME
FROM %s
WHERE W_ID = ?
Expand All @@ -56,7 +56,7 @@ public class Payment extends TPCCProcedure {

public SQLStmt payUpdateDistSQL =
new SQLStmt(
"""
"""
UPDATE %s
SET D_YTD = D_YTD + ?
WHERE D_W_ID = ?
Expand All @@ -66,7 +66,7 @@ public class Payment extends TPCCProcedure {

public SQLStmt payGetDistSQL =
new SQLStmt(
"""
"""
SELECT D_STREET_1, D_STREET_2, D_CITY, D_STATE, D_ZIP, D_NAME
FROM %s
WHERE D_W_ID = ?
Expand All @@ -76,7 +76,7 @@ public class Payment extends TPCCProcedure {

public SQLStmt payGetCustSQL =
new SQLStmt(
"""
"""
SELECT C_FIRST, C_MIDDLE, C_LAST, C_STREET_1, C_STREET_2,
C_CITY, C_STATE, C_ZIP, C_PHONE, C_CREDIT, C_CREDIT_LIM,
C_DISCOUNT, C_BALANCE, C_YTD_PAYMENT, C_PAYMENT_CNT, C_SINCE
Expand All @@ -89,7 +89,7 @@ public class Payment extends TPCCProcedure {

public SQLStmt payGetCustCdataSQL =
new SQLStmt(
"""
"""
SELECT C_DATA
FROM %s
WHERE C_W_ID = ?
Expand All @@ -100,7 +100,7 @@ public class Payment extends TPCCProcedure {

public SQLStmt payUpdateCustBalCdataSQL =
new SQLStmt(
"""
"""
UPDATE %s
SET C_BALANCE = ?,
C_YTD_PAYMENT = ?,
Expand All @@ -114,7 +114,7 @@ public class Payment extends TPCCProcedure {

public SQLStmt payUpdateCustBalSQL =
new SQLStmt(
"""
"""
UPDATE %s
SET C_BALANCE = ?,
C_YTD_PAYMENT = ?,
Expand All @@ -127,7 +127,7 @@ public class Payment extends TPCCProcedure {

public SQLStmt payInsertHistSQL =
new SQLStmt(
"""
"""
INSERT INTO %s
(H_C_D_ID, H_C_W_ID, H_C_ID, H_D_ID, H_W_ID, H_DATE, H_AMOUNT, H_DATA)
VALUES (?,?,?,?,?,?,?,?)
Expand All @@ -136,7 +136,7 @@ public class Payment extends TPCCProcedure {

public SQLStmt customerByNameSQL =
new SQLStmt(
"""
"""
SELECT C_FIRST, C_MIDDLE, C_ID, C_STREET_1, C_STREET_2, C_CITY,
C_STATE, C_ZIP, C_PHONE, C_CREDIT, C_CREDIT_LIM, C_DISCOUNT,
C_BALANCE, C_YTD_PAYMENT, C_PAYMENT_CNT, C_SINCE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public class StockLevel extends TPCCProcedure {

public SQLStmt stockGetDistOrderIdSQL =
new SQLStmt(
"""
"""
SELECT D_NEXT_O_ID
FROM %s
WHERE D_W_ID = ?
Expand All @@ -45,7 +45,7 @@ public class StockLevel extends TPCCProcedure {

public SQLStmt stockGetCountStockSQL =
new SQLStmt(
"""
"""
SELECT COUNT(DISTINCT (S_I_ID)) AS STOCK_COUNT
FROM %s, %s
WHERE OL_W_ID = ?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ CREATE view revenue0 (supplier_no, total_revenue) AS
""");

public final SQLStmt dropview_stmt =
new SQLStmt("""
new SQLStmt(
"""
DROP VIEW revenue0
""");

Expand Down

0 comments on commit 7154f6e

Please sign in to comment.