@@ -6,32 +6,44 @@ The created `samples/nw_sample` illustrates important customization sample code
6
6
7
7
## Sqlite Sample Databases
8
8
9
- The ` samples/db ` files are symbolic links to pre-installed sqlite databases. These allow you to explore creating projects from existing databases.
9
+ The ` samples/db ` files are pre-installed sqlite databases. These allow you to explore creating projects from existing databases.
10
10
11
11
For example, create Northwind like this:
12
12
13
13
``` bash
14
14
genai-logic create --project_name=nw --db_url=sqlite:///samples/dbs/nw.sqlite
15
15
```
16
16
17
- > Note: If the symbolic links are missing, it is probably due to permission issues, e.g., on windows you must run the Shell with Admin privileges. You can continue using the abbeviations instead of a standard SQLAlchemy database uri.
18
-
19
17
## Database Connectivity
20
18
21
19
Sample project creation commands:
22
20
23
21
``` bash
24
- genai-logic create
25
- genai-logic create-and-run
26
- genai-logic create --db_url=sqlite:////Users/val/dev/todo_example/todos.db --project_name=todo
22
+ # local sqlite
27
23
genai-logic create --db_url=sqlite:///c:\g enai-logic\n w.sqlite --project_name=nw
28
- genai-logic create --db_url=sqlite:///ai.sqlite --project_name=ai --open_with=code
29
- genai-logic create --db_url=mysql+pymysql://root:p@mysql-container:3306/classicmodels --project_name=/localhost/docker_db_project
30
- genai-logic create --db_url=' mssql+pyodbc://sa:Posey3861@localhost:1433/NORTHWND?driver=ODBC+Driver+18+for+SQL+Server&trusted_connection=no&Encrypt=no'
24
+ genai-logic create --db_url=sqlite:///samples/dbs/todos.sqlite --project_name=todo
25
+ genai-logic create --db_url=sqlite:////Users/val/dev/ApiLogicServer/ApiLogicServer-dev/clean/ApiLogicServer/samples/dbs/todos.sqlite --project_name=todo
26
+
27
+ # from localhost to mysql container
28
+ genai-logic create --db_url=mysql+pymysql://root:p@localhost:3306/classicmodels --project_name=docker_classicmodels
29
+ genai-logic create --db_url=mysql+pymysql://root:p@localhost:3306/Chinook --project_name=docker_chinook
30
+
31
+ # from container to mysql container replace localhost with....
32
+ genai-logic create --db_url=mysql+pymysql://root:p@mysql-container:3306/Chinook --project_name=/localhost/docker_chinook
33
+
34
+ # microsoft sql server (setup: https://apilogicserver.github.io/Docs/Install-pyodbc/)
35
+ genai-logic create --db_url=' mssql+pyodbc://sa:Posey3861@localhost:1433/NORTHWND?driver=ODBC+Driver+18+for+SQL+Server&trusted_connection=no&Encrypt=no' --project-name=NORTHWND
36
+
37
+ # oracle
31
38
genai-logic create --project_name=oracle_hr --db_url=' oracle+oracledb://hr:tiger@localhost:1521/?service_name=ORCL'
39
+
40
+ # postgres
41
+ genai-logic create --db_url=postgresql://postgres:p@localhost/northwind --project-name=nw-postgres
32
42
genai-logic create --db_url=postgresql://postgres:
[email protected] /postgres
33
43
genai-logic create --project_name=my_schema --db_url=postgresql://postgres:p@localhost/my_schema
34
44
genai-logic create --db_url=postgresql://postgres:password@localhost:5432/postgres? options=-csearch_path%3Dmy_db_schema
45
+
46
+ # pythonanywhere
35
47
genai-logic create --project_name=Chinook \
36
48
--host=ApiLogicServer.pythonanywhere.com --port= \
37
49
--db_url=mysql+pymysql://ApiLogicServer:@ApiLogicServer.mysql.pythonanywhere-services.com/ApiLogicServer\$ Chinook
0 commit comments