mirror of https://github.com/usememos/memos
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Replace the custom now() function with an idiomatic `now` timestamp variable (host-injected, frozen once per compile) and retype created_ts/updated_ts/create_time to CEL timestamp. Filters now use standard timestamp/duration arithmetic, e.g. `created_ts >= now - duration("24h")` and `timestamp("2025-01-01T00:00:00Z")`.
Add standard CEL surface that compiles to SQL across SQLite/MySQL/Postgres: timestamp accessors (getFullYear/getMonth/getDate/getDayOfWeek/..., with 0-based month and weekday normalized), ext.Sets() (sets.contains/intersects/equivalent over tags), tags.exists_one(), size() on string fields, and division/modulo folding. A frozen clock is injectable for deterministic tests.
BREAKING CHANGE: now() is removed (use the `now` variable) and time fields are timestamps, so bare-epoch comparisons need timestamp(<epoch>). Existing saved shortcuts using the old syntax must be updated.
|
2 weeks ago | |
|---|---|---|
| .. | ||
| README.md | 1 year ago | |
| attachment_filter_test.go | 2 weeks ago | |
| attachment_test.go | 1 month ago | |
| containers.go | 2 months ago | |
| database_size_test.go | 2 months ago | |
| filter_helpers_test.go | 2 weeks ago | |
| idp_test.go | 4 months ago | |
| inbox_test.go | 4 months ago | |
| instance_setting_test.go | 3 months ago | |
| main_test.go | 6 months ago | |
| memo_filter_functions_test.go | 2 weeks ago | |
| memo_filter_test.go | 2 weeks ago | |
| memo_relation_test.go | 4 months ago | |
| memo_test.go | 4 months ago | |
| migrator_test.go | 1 month ago | |
| migrator_upgrade_test.go | 2 months ago | |
| reaction_test.go | 6 months ago | |
| store.go | 6 months ago | |
| user_delete_test.go | 1 month ago | |
| user_identity_test.go | 3 months ago | |
| user_setting_test.go | 4 months ago | |
| user_test.go | 1 month ago | |
README.md
Store tests
How to test store with MySQL?
- Create a database in your MySQL server.
- Run the following command with two environment variables set:
DRIVER=mysql DSN=root@/memos_test go test -v ./test/store/...
DRIVERshould be set tomysql.DSNshould be set to the DSN of your MySQL server.