Adding connection/store to your project
xannem opened this issue · comments
Docs for using Build Database
If you create a connection in the form mode and you do not have an existing store, you may get a null pointer exception. What you can do for now is build database
through the store
tab in your connection form, which will generate a store for you.
Process shown in video below:
studio_buildingDatabase.mp4
Alternatively, you can start off in text mode where you write your store. Then, you can switch to form mode and create a relational connection and in the 'store' tab choose the store that you created.
Process shown in video below:
studio_buildingDatabaseFromTextMode.mp4
Example H2 Local Database SQL:
Drop table if exists FirmTable;
Drop table if exists PersonTable;
Create Table FirmTable(id INT, Legal_Name VARCHAR(200));
Create Table PersonTable(id INT, firm_id INT, lastName VARCHAR(200), firstName VARCHAR(200));
Insert into FirmTable (id, Legal_Name) values (1, 'FirmA');
Insert into FirmTable (id, Legal_Name) values (2, 'Apple');
Insert into PersonTable (id, firm_id, lastName, firstName) values (1, 1, 'John', 'Doe');
Example Text Generated Store:
###Relational
Database store::MyDatabase
(
Schema PUBLIC
(
Table FIRMTABLE
(
ID INTEGER,
LEGAL_NAME VARCHAR(200)
)
Table PERSONTABLE
(
ID INTEGER,
FIRM_ID INTEGER,
LASTNAME VARCHAR(200),
FIRSTNAME VARCHAR(200)
)
)
)
This issue is stale because it has been open for 30 days with no activity. Please remove stale label or add any comment to keep this open. Otherwise this will be closed in 5 days.
This issue was closed because it has been inactive for 35 days. Please re-open if this issue is still relevant.