From 50783c3a7584dad74b681e035bf6fe9d19f0c3f0 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 18 Jul 2024 10:19:57 +0200 Subject: [PATCH 1/2] fix doc: replace delete with truncate --- README.fr.md | 4 ++-- README.md | 4 ++-- example.yml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.fr.md b/README.fr.md index 737f7ee..dba11e3 100644 --- a/README.fr.md +++ b/README.fr.md @@ -31,10 +31,10 @@ rules: name: company_name - table: access_log query: 'select * from access_log where date < (NOW() - INTERVAL 6 MONTH)' - delete: true + truncate: true - table: user_ip primary_key: [user_id, ip_id] - delete: true + truncate: true ``` ### Exécution diff --git a/README.md b/README.md index ab77546..dd8e5e1 100644 --- a/README.md +++ b/README.md @@ -31,10 +31,10 @@ rules: name: company_name - table: access_log query: 'select * from access_log where date < (NOW() - INTERVAL 6 MONTH)' - delete: true + truncate: true - table: user_ip primary_key: [user_id, ip_id] - delete: true + truncate: true ``` ### Run diff --git a/example.yml b/example.yml index da3b9e5..3a52a1a 100644 --- a/example.yml +++ b/example.yml @@ -16,7 +16,7 @@ rules: name: company_name - table: access_log query: 'select * from access_log where date < (NOW() - INTERVAL 6 MONTH)' - delete: true + truncate: true - table: user_ip primary_key: [user_id, ip_id] - delete: true + truncate: true From 6c9e1cfd06b8704afc844c67ee4a430991066d54 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Thu, 18 Jul 2024 15:26:45 +0200 Subject: [PATCH 2/2] add default type of string --- CHANGELOG.md | 4 ++++ database/database.go | 1 + 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf96c32..ba46f62 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ ## [Unreleased] +## v1.2.1 +### Fixed +- add default type of string + ## v1.2.0 ### Added - add "lorem_word" faker diff --git a/database/database.go b/database/database.go index 9998c6a..6a1c699 100644 --- a/database/database.go +++ b/database/database.go @@ -73,6 +73,7 @@ func GetRows(db *sql.DB, query, table, dbType string) map[int]map[string]data.Da value := values[i] d := data.Data{ IsVirtual: false, + IsString: true, IsNull: value == nil, }