~rbn/rom unlisted

0e3c6435877691b3c0635f8e1f678904d5f99bb7 — Ruben Schuller 3 months ago 629598e v0.0.17
add note about using SQLite features like fts5
6 files changed, 52 insertions(+), 7 deletions(-)

M README.md
M cmd/rom/doc.go
M doc/README.md
M doc/cmddoc.go
M doc/contents/install.txt
M doc/contents/sqlite_quirks.txt
M README.md => README.md +18 -3
@@ 8,10 8,21 @@ reads schema information from various DBMS and generates according code.

## install

```
go install go.rbn.im/rom/cmd/rom

```
the easiest method of installation is using go install

	go install go.rbn.im/rom/cmd/rom

if you use additional SQLite features in your database, you
may have to install rom with support for them.
add the appropriate build tags as described at 
https://github.com/mattn/go-sqlite3#features
for example, if your database uses fts5 use the fts5 tag:

	go install -tags fts5 go.rbn.im/rom/cmd/rom




## supported databases



@@ 430,6 441,10 @@ with AS, e.g.:
otherwise the column name in go would be the literal 'foo || "bar"' which
results in garbled code generation.

to have SQLite rowid columns available, you must alias them by creating
a column of type INTEGER PRIMARY KEY, like described at 
https://sqlite.org/lang_createtable.html#rowids_and_the_integer_primary_key

## todo

i suppose the generated code isn't everybodys taste :)

M cmd/rom/doc.go => cmd/rom/doc.go +15 -0
@@ 3,8 3,19 @@

Installation

the easiest method of installation is using go install

	go install go.rbn.im/rom/cmd/rom

if you use additional SQLite features in your database, you
may have to install rom with support for them.
add the appropriate build tags as described at
https://github.com/mattn/go-sqlite3#features
for example, if your database uses fts5 use the fts5 tag:

	go install -tags fts5 go.rbn.im/rom/cmd/rom



Supported Databases



@@ 432,6 443,10 @@ with AS, e.g.:
otherwise the column name in go would be the literal 'foo || "bar"' which
results in garbled code generation.

to have SQLite rowid columns available, you must alias them by creating
a column of type INTEGER PRIMARY KEY, like described at
https://sqlite.org/lang_createtable.html#rowids_and_the_integer_primary_key


Todo


M doc/README.md => doc/README.md +2 -2
@@ 7,9 7,9 @@
[ insert subtitle ]
## install

```

[ insert install ]
```


## supported databases


M doc/cmddoc.go => doc/cmddoc.go +1 -1
@@ 2,7 2,7 @@

Installation

	[ join [ split [ insert install ] \n ] \n\t ]
[ insert install ]

Supported Databases


M doc/contents/install.txt => doc/contents/install.txt +12 -1
@@ 1,1 1,12 @@
go install go.rbn.im/rom/cmd/rom
the easiest method of installation is using go install

	go install go.rbn.im/rom/cmd/rom

if you use additional SQLite features in your database, you
may have to install rom with support for them.
add the appropriate build tags as described at 
https://github.com/mattn/go-sqlite3#features
for example, if your database uses fts5 use the fts5 tag:

	go install -tags fts5 go.rbn.im/rom/cmd/rom


M doc/contents/sqlite_quirks.txt => doc/contents/sqlite_quirks.txt +4 -0
@@ 8,3 8,7 @@ with AS, e.g.:

otherwise the column name in go would be the literal 'foo || "bar"' which
results in garbled code generation.

to have SQLite rowid columns available, you must alias them by creating
a column of type INTEGER PRIMARY KEY, like described at 
https://sqlite.org/lang_createtable.html#rowids_and_the_integer_primary_key