-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(er-view) + Subproject: Updated the table's view
minor push submodules update.
- Loading branch information
Showing
5 changed files
with
48 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,5 @@ | |
/temp.md | ||
/docs/Tables | ||
/Guid.md | ||
/.metadata | ||
/Servers |
Submodule bookify-obms-console-app
updated
from 7669ea to 9f837e
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
|
||
|
||
CREATE SEQUENCE BOOK_CATEGORY_SEQ | ||
START WITH 1 | ||
INCREMENT BY 1; | ||
|
||
CREATE OR REPLACE TRIGGER BOOK_CATEGORY_ID_TRIGGER BEFORE | ||
INSERT ON BOOKCATEGORY FOR EACH ROW | ||
BEGIN | ||
SELECT | ||
'bc' | ||
|| TO_CHAR(BOOK_CATEGORY_SEQ.NEXTVAL, 'FM00000') INTO :NEW.CATEGORYID | ||
FROM | ||
DUAL; | ||
END; | ||
/ | ||
|
||
CREATE OR REPLACE PROCEDURE INSERT_BOOK_CATEGORY( | ||
P_CATEGORY_NAME IN BOOKCATEGORY.CATEGORYNAME%TYPE, | ||
P_CATEGORY_DESCRIPTION IN BOOKCATEGORY.CATEGORYDESCRIPTION%TYPE, | ||
P_CATEGORY_IMAGE IN BOOKCATEGORY.CATEGORYIMAGE%TYPE, | ||
P_NEW_ID OUT BOOKCATEGORY.CATEGORYID%TYPE | ||
) AS | ||
BEGIN | ||
INSERT INTO BOOKCATEGORY ( | ||
CATEGORYNAME, | ||
CATEGORYDESCRIPTION, | ||
CATEGORYIMAGE | ||
) VALUES ( | ||
P_CATEGORY_NAME, | ||
P_CATEGORY_DESCRIPTION, | ||
P_CATEGORY_IMAGE | ||
) RETURNING CATEGORYID INTO P_NEW_ID; | ||
END; | ||
/ | ||
|
||
|
||
CallableStatement stmt = connection.prepareCall("{call insert_book_category(?, ?, ?, ?)}"); | ||
stmt.setString(1, categoryName); | ||
stmt.setString(2, categoryDescription); | ||
stmt.setString(3, categoryImage); | ||
stmt.registerOutParameter(4, Types.VARCHAR); | ||
stmt.execute(); | ||
String newId = stmt.getString(4); |