Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit e56fc91

Browse files
authored
Use hardcoded IDs in import.sql (#18)
1 parent 5054034 commit e56fc91

File tree

11 files changed

+65
-65
lines changed
  • code
    • exercise_008_Adding_REST_data_Panache/src/main/resources
    • exercise_009_Hook_up_the_React_app/src/main/resources
    • exercise_010_Validation_and_PUT/src/main/resources
    • exercise_011_Going_Reactive/src/main/resources
    • exercise_012_Reactive_search_endpoint/src/main/resources
    • exercise_013_Listen_and_Notify/src/main/resources
    • exercise_014_Internal_Channels
    • exercise_015_Connecting_to_Kafka
    • exercise_016_Dead_Letter_Queue_and_Stream_filtering/src/main/resources

11 files changed

+65
-65
lines changed
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
INSERT into Product (id, name, description, price) VALUES (nextval('product_seq'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
2-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Dinner Table', 'Sturdy oak Table', 200);
3-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Coffee Table', 'An oak coffee Table', 120);
4-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Side Table', 'A Nice little oak side table', 80);
5-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Mirror', 'A round mirror with oak frame', 80);
6-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Lamp', 'A light that shines', 45);
7-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Carpet', 'Soft carpet', 39.95);
1+
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
2+
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
3+
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
4+
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
5+
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
6+
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
7+
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
INSERT into Product (id, name, description, price) VALUES (nextval('product_seq'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
2-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Dinner Table', 'Sturdy oak Table', 200);
3-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Coffee Table', 'An oak coffee Table', 120);
4-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Side Table', 'A Nice little oak side table', 80);
5-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Mirror', 'A round mirror with oak frame', 80);
6-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Lamp', 'A light that shines', 45);
7-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Carpet', 'Soft carpet', 39.95);
1+
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
2+
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
3+
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
4+
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
5+
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
6+
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
7+
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
INSERT into Product (id, name, description, price) VALUES (nextval('product_seq'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
2-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Dinner Table', 'Sturdy oak Table', 200);
3-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Coffee Table', 'An oak coffee Table', 120);
4-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Side Table', 'A Nice little oak side table', 80);
5-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Mirror', 'A round mirror with oak frame', 80);
6-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Lamp', 'A light that shines', 45);
7-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Carpet', 'Soft carpet', 39.95);
1+
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
2+
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
3+
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
4+
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
5+
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
6+
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
7+
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
INSERT into Product (id, name, description, price) VALUES (nextval('product_seq'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
2-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Dinner Table', 'Sturdy oak Table', 200);
3-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Coffee Table', 'An oak coffee Table', 120);
4-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Side Table', 'A Nice little oak side table', 80);
5-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Mirror', 'A round mirror with oak frame', 80);
6-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Lamp', 'A light that shines', 45);
7-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Carpet', 'Soft carpet', 39.95);
1+
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
2+
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
3+
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
4+
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
5+
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
6+
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
7+
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
INSERT into Product (id, name, description, price) VALUES (nextval('product_seq'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
2-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Dinner Table', 'Sturdy oak Table', 200);
3-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Coffee Table', 'An oak coffee Table', 120);
4-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Side Table', 'A Nice little oak side table', 80);
5-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Mirror', 'A round mirror with oak frame', 80);
6-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Lamp', 'A light that shines', 45);
7-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Carpet', 'Soft carpet', 39.95);
1+
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
2+
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
3+
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
4+
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
5+
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
6+
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
7+
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
INSERT into Product (id, name, description, price) VALUES (nextval('product_seq'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
2-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Dinner Table', 'Sturdy oak Table', 200);
3-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Coffee Table', 'An oak coffee Table', 120);
4-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Side Table', 'A Nice little oak side table', 80);
5-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Mirror', 'A round mirror with oak frame', 80);
6-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Lamp', 'A light that shines', 45);
7-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Carpet', 'Soft carpet', 39.95);
1+
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
2+
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
3+
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
4+
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
5+
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
6+
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
7+
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);

code/exercise_014_Internal_Channels/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class PriceUpdateStreams {
3737
}
3838
```
3939

40-
* Implement the method `public Multi<PriceUpdate> generate()` on the `PriceUpdateStreams` class, and make it return a `Multi` that emits a `PriceUpdate` item *every five seconds*, using a random price between 0 and 100, for each of the products in our database (You can hardcode the product IDs - use `curl localhost:8080/products` to discover the product IDs saved in the database) .
40+
* Implement the method `public Multi<PriceUpdate> generate()` on the `PriceUpdateStreams` class, and make it return a `Multi` that emits a `PriceUpdate` item *every five seconds*, using a random price between 0 and 100, for each of the products in our database (You can hardcode the product IDs 1 to 7 inclusive) .
4141

4242
Tip, look at the `Multi.createFrom().ticks()` method!
4343
Note that the `print` method has an `@Incoming` annotation that matches the `@Outgoing` from the `generate` method. Running the application should print seven lines to the console every five seconds, each line being a price update for a product. Run the app to try this :)
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
INSERT into Product (id, name, description, price) VALUES (nextval('product_seq'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
2-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Dinner Table', 'Sturdy oak Table', 200);
3-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Coffee Table', 'An oak coffee Table', 120);
4-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Side Table', 'A Nice little oak side table', 80);
5-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Mirror', 'A round mirror with oak frame', 80);
6-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Lamp', 'A light that shines', 45);
7-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Carpet', 'Soft carpet', 39.95);
1+
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
2+
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
3+
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
4+
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
5+
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
6+
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
7+
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);

code/exercise_015_Connecting_to_Kafka/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ In this exercise, we will connect our price processing components to Kafka. For
2222

2323
* You should see price updates streaming by again.
2424
* You can check what’s going on in Kafka with the Kafka Dev UI:
25-
* http://localhost:8080/q/dev-ui/io.quarkus.quarkus-kafka-client/topics
25+
* http://localhost:8080/q/dev-ui/io.quarkus.quarkus-kafka-client/topics
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
INSERT into Product (id, name, description, price) VALUES (nextval('product_seq'), 'Chair', 'A metal frame chair, with oak seat', 59.95);
2-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Dinner Table', 'Sturdy oak Table', 200);
3-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Coffee Table', 'An oak coffee Table', 120);
4-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Side Table', 'A Nice little oak side table', 80);
5-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Mirror', 'A round mirror with oak frame', 80);
6-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Lamp', 'A light that shines', 45);
7-
INSERT into Product (id, name, description, price) VALUES (nextval('Product_seq'), 'Carpet', 'Soft carpet', 39.95);
1+
INSERT into Product (id, name, description, price) VALUES (1, 'Chair', 'A metal frame chair, with oak seat', 59.95);
2+
INSERT into Product (id, name, description, price) VALUES (2, 'Dinner Table', 'Sturdy oak Table', 200);
3+
INSERT into Product (id, name, description, price) VALUES (3, 'Coffee Table', 'An oak coffee Table', 120);
4+
INSERT into Product (id, name, description, price) VALUES (4, 'Side Table', 'A Nice little oak side table', 80);
5+
INSERT into Product (id, name, description, price) VALUES (5, 'Mirror', 'A round mirror with oak frame', 80);
6+
INSERT into Product (id, name, description, price) VALUES (6, 'Lamp', 'A light that shines', 45);
7+
INSERT into Product (id, name, description, price) VALUES (7, 'Carpet', 'Soft carpet', 39.95);

0 commit comments

Comments
 (0)