Skip to content

Commit d2f8155

Browse files
committed
Merge branch 'main' of github.com:dvanderweele/DBML_SQLite
2 parents cac79c6 + 8bcb97a commit d2f8155

File tree

2 files changed

+46
-449
lines changed

2 files changed

+46
-449
lines changed

README.rst

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
DBML to SQLite Utility
44
======================
55

6-
**v0.1.0**
6+
**v0.2.0**
77

88
This is a simple package built on top of `the PyDBML package by
99
Vanderhoof <https://github.com/Vanderhoof/PyDBML>`__. It allows you,
@@ -25,6 +25,9 @@ Or:
2525

2626
poetry add dbml_sqlite
2727

28+
Note that if you install the tool on your system globally with pip, you
29+
should be able to use the CLI anywhere.
30+
2831
Usage
2932
-----
3033

@@ -67,6 +70,48 @@ There are other functions in the package, but they are intended for
6770
internal use only within the package. In-depth coverage of the rest of
6871
the API is at the end of this README.
6972

73+
CLI
74+
---
75+
76+
After installation, you can use the CLI from your terminal as follows:
77+
78+
::
79+
80+
dbml_sqlite [OPTIONS] SRC
81+
82+
SRC is mandatory and is the file containing dbml you want converted.
83+
84+
+---------------------------------------+-------------------------------+
85+
| Options | Meaning |
86+
+=======================================+===============================+
87+
| -p, –print / -n, –no-print | Whether to print output to |
88+
| | console. [default: print] |
89+
+---------------------------------------+-------------------------------+
90+
| -w, –write PATH | (Optional) File you want |
91+
| | output written to. |
92+
+---------------------------------------+-------------------------------+
93+
| -x, –execute PATH | (Optional) SQLite database |
94+
| | file for executing output DDL |
95+
| | on. Will create file if it |
96+
| | doesn’t exist. |
97+
+---------------------------------------+-------------------------------+
98+
| -f, –full / -h, –half | Full emulation mode (separate |
99+
| | tables) or half emulation |
100+
| | mode (check statements) for |
101+
| | any enums defined in your |
102+
| | dbml. [default: full] |
103+
+---------------------------------------+-------------------------------+
104+
| -t, –if-table-exists | (Optional) Add IF NOT EXISTS |
105+
| | language to CREATE TABLE |
106+
| | statements. |
107+
+---------------------------------------+-------------------------------+
108+
| -i, –if-index-exists | (Optional) Add IF NOT EXISTS |
109+
| | language to CREATE INDEX |
110+
| | statements. |
111+
+---------------------------------------+-------------------------------+
112+
| –help | Show this message and exit. |
113+
+---------------------------------------+-------------------------------+
114+
70115
Writing SQLite Compatible DBML
71116
------------------------------
72117

0 commit comments

Comments
 (0)