numerus/pkg
jordi fita mas ef215f1e6e Add a cache of OID in database to register types
It makes no sense to retrieve the same OIDs each and every connection,
because they are not going to change unless the database is reset,
something it is very unlikely to happen in production.

Thus, it is best to query them the first time the application connects
to the database, that it is done at startup to query the available
languages, and then reuse the OIDs.

I can get away of using an “unprotected” map, instead of sync.Map or a
map in tandem with sync.RWMutex, because the application establishes a
connection at startup from a single goroutine, and it registers _all_
types we will need to register within the application’s lifespan, hence
it there will be no more writes to that map once the web server is
listening for incoming connections.

This is risky, however, and i hope i do not have to regret it.
2023-10-27 12:44:24 +02:00
..
company.go Create validation function for SQL domains and for phones 2023-07-03 11:31:59 +02:00
contacts.go Return HTTP 404 instead of 500 for invalid UUID values in URL 2023-07-17 12:07:23 +02:00
dashboard.go Compute the total amount, base plus taxes, of all expenses 2023-07-13 20:50:26 +02:00
db.go Allow importing contacts from Holded 2023-07-03 00:05:47 +02:00
expenses.go Add the sum of the base and taxes to expenses’ index 2023-10-02 16:36:42 +02:00
form.go Add option to export the list of quotes, invoices, and expenses to ODS 2023-07-18 13:29:36 +02:00
htmx.go Use HTMx to add product rows “inline” in the invoice form 2023-04-24 02:00:38 +02:00
invoices.go Do not give “false ID” to invoice products that come from quotations 2023-08-11 19:47:10 +02:00
locale.go Add currency_pattern to language relation 2023-02-23 12:12:33 +01:00
logger.go Reduce the amount of useless data in request’s log 2023-06-13 16:05:40 +02:00
login.go Log the remote address, and only trust localhost proxies 2023-06-13 14:21:54 +02:00
ods.go Add option to export the list of quotes, invoices, and expenses to ODS 2023-07-18 13:29:36 +02:00
pgtypes.go Add a cache of OID in database to register types 2023-10-27 12:44:24 +02:00
products.go Return HTTP 404 instead of 500 for invalid UUID values in URL 2023-07-17 12:07:23 +02:00
profile.go Create constants for the HTMX request and response headers used 2023-04-06 12:07:20 +02:00
quote.go Add option to export the list of quotes, invoices, and expenses to ODS 2023-07-18 13:29:36 +02:00
recover.go Gofmt recover.go 2023-01-22 20:37:34 +01:00
router.go Compute the total amount, base plus taxes, of all expenses 2023-07-13 20:50:26 +02:00
slug.go Add the customer name to the invoice’s PDF file name 2023-07-07 11:34:34 +02:00
template.go Add the customer name to the invoice’s PDF file name 2023-07-07 11:34:34 +02:00
uuid.go Return HTTP 404 instead of 500 for invalid UUID values in URL 2023-07-17 12:07:23 +02:00
uuid_test.go Return HTTP 404 instead of 500 for invalid UUID values in URL 2023-07-17 12:07:23 +02:00