1
1
mirror of https://github.com/go-gitea/gitea synced 2025-08-24 18:38:28 +00:00
This commit is contained in:
techknowlogick
2021-02-28 18:08:33 -05:00
committed by GitHub
parent 030646eea4
commit 47f6a4ec3f
947 changed files with 26119 additions and 7062 deletions

View File

@@ -90,6 +90,13 @@ databases.
post: "..."
```
Binary columns can be represented as hexadecimal strings (should start with `0x`):
```yaml
- id: 1
binary_column: 0x1234567890abcdef
```
If you need to write raw SQL, probably to call a function, prefix the value
of the column with `RAW=`:
@@ -129,7 +136,7 @@ func TestMain(m *testing.M) {
...
}
fixtures, err := testfixtures.New(
fixtures, err = testfixtures.New(
testfixtures.Database(db), // You database connection
testfixtures.Dialect("postgres"), // Available: "postgresql", "timescaledb", "mysql", "mariadb", "sqlite" and "sqlserver"
testfixtures.Directory("testdata/fixtures"), // the directory containing the YAML files
@@ -497,6 +504,7 @@ unit test database code without having to connect to a real database
- [dbcleaner][dbcleaner] - Clean database for testing, inspired by
database_cleaner for Ruby
[doc]: https://pkg.go.dev/github.com/go-testfixtures/testfixtures/v3?tab=doc
[railstests]: http://guides.rubyonrails.org/testing.html#the-test-database
[gotxdb]: https://github.com/DATA-DOG/go-txdb
[gosqlmock]: https://github.com/DATA-DOG/go-sqlmock