numerus/pkg
jordi fita mas bc48dd4089 Replace tag relations with array attributes
It all started when i wanted to try to filter invoices by multiple tags
using an “AND”, instead of “OR” as it was doing until now.  But
something felt off and seemed to me that i was doing thing much more
complex than needed, all to be able to list the tags as a suggestion
in the input field—which i am not doing yet.

I found this article series[0] exploring different approaches for
tagging, which includes the one i was using, and comparing their
performance.  I have not actually tested it, but it seems that i have
chosen the worst option, in both query time and storage.

I attempted to try using an array attribute to each table, which is more
or less the same they did in the articles but without using a separate
relation for tags, and i found out that all the queries were way easier
to write, and needed two joins less, so it was a no-brainer.

[0]: http://www.databasesoup.com/2015/01/tag-all-things.html
2023-04-07 21:31:35 +02:00
..
company.go Create constants for the HTMX request and response headers used 2023-04-06 12:07:20 +02:00
contacts.go Replace tag relations with array attributes 2023-04-07 21:31:35 +02:00
db.go Properly register array and composite PostgreSQL types with pgtype 2023-02-20 11:42:21 +01:00
form.go Add filters form for invoices 2023-03-29 16:16:31 +02:00
htmx.go Create constants for the HTMX request and response headers used 2023-04-06 12:07:20 +02:00
invoices.go Replace tag relations with array attributes 2023-04-07 21:31:35 +02:00
locale.go Add currency_pattern to language relation 2023-02-23 12:12:33 +01:00
logger.go Move source file to the root of pkg 2023-01-17 10:40:22 +01:00
login.go Replace default router with github.com/julienschmidt/httprouter 2023-02-03 12:30:56 +01:00
pgtypes.go Replace tag relations with array attributes 2023-04-07 21:31:35 +02:00
products.go Replace tag relations with array attributes 2023-04-07 21:31:35 +02:00
profile.go Create constants for the HTMX request and response headers used 2023-04-06 12:07:20 +02:00
recover.go Gofmt recover.go 2023-01-22 20:37:34 +01:00
router.go Show the duplicate invoice form in a dialog 2023-04-04 14:39:55 +02:00
template.go Boost the main navigation links with HTMx 2023-03-23 10:55:02 +01:00