Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
FrancoLiberali committed Aug 10, 2023
1 parent 3a559e8 commit fdfcae6
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
4 changes: 2 additions & 2 deletions docs/badaas-orm/connecting_to_a_database.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ Connecting to a database
Connection
-----------------------------

badaas-orm supports the PostgreSQL databases using gorm's driver.
Some databases may be compatible with the postgres dialect,
badaas-orm supports the databases MySQL, PostgreSQL, SQLite, SQL Server using gorm's driver.
Some databases may be compatible with the mysql or postgres dialect,
in which case you could just use the dialect for those databases (from which CockroachDB is tested).

To communicate with the database badaas-orm need a orm.DB object.
Expand Down
25 changes: 16 additions & 9 deletions docs/badaas-orm/query.rst
Original file line number Diff line number Diff line change
Expand Up @@ -161,15 +161,22 @@ Below you will find the complete list of available operators:
- orm.IsNotNull()
- orm.Between(v1, v2): Equivalent to v1 < attribute < v2
- orm.NotBetween(v1, v2): Equivalent to NOT (v1 < attribute < v2)
- orm.IsTrue()
- orm.IsNotTrue()
- orm.IsFalse()
- orm.IsNotFalse()
- orm.IsUnknown()
- orm.IsNotUnknown()
- orm.IsDistinct(value)
- orm.IsNotDistinct(value)
- orm.IsTrue() (Not supported by: sqlserver)
- orm.IsNotTrue() (Not supported by: sqlserver)
- orm.IsFalse() (Not supported by: sqlserver)
- orm.IsNotFalse() (Not supported by: sqlserver)
- orm.IsUnknown() (Not supported by: sqlserver, sqlite)
- orm.IsNotUnknown() (Not supported by: sqlserver, sqlite)
- orm.IsDistinct(value) (Not supported by: mysql)
- orm.IsNotDistinct(value) (Not supported by: mysql)
- orm.Like(pattern)
- orm.Like(pattern).Escape(escape)
- orm.ArrayIn(values)
- orm.ArrayNotIn(values)
- orm.ArrayNotIn(values)

In addition to these, badaas-orm gives the possibility to use operators
that are only supported by a certain database (outside the standard).
These operators can be found in <https://pkg.go.dev/github.com/ditrit/badaas/orm/mysql>,
<https://pkg.go.dev/github.com/ditrit/badaas/orm/sqlserver>,
<https://pkg.go.dev/github.com/ditrit/badaas/orm/psql>
and <https://pkg.go.dev/github.com/ditrit/badaas/orm/sqlite>.
4 changes: 3 additions & 1 deletion docs/contributing/developing.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,14 @@ make -k test_unit

### Integration tests

Integration tests have a database and the dependency injection system.
Integration tests have a database and the dependency injection system. Badaas-orm is tested on multiple databases. By default, the database used will be postgresql:

```sh
make test_integration
```

To run the tests on another database you can use: `make test_integration_postgresql`, `make test_integration_cockroachdb`, `make test_integration_mysql`, `make test_integration_sqlite`, `make test_integration_sqlserver`. All of them will be verified by our continuous integration system.

### Feature tests (end to end tests)

These are black box tests that test BaDaaS using its http api. We use docker to run a Badaas instance in combination with one node of CockroachDB.
Expand Down

0 comments on commit fdfcae6

Please sign in to comment.