Commit Graph

12 Commits

Author SHA1 Message Date
Aaron Lindsay 3e3038295d Split reports into models 2017-12-05 05:59:44 -05:00
Aaron Lindsay 5f296e8669 Split prices into models 2017-12-05 05:59:44 -05:00
Aaron Lindsay 128ea57c4d Split accounts and transactions into models 2017-12-05 05:59:44 -05:00
Aaron Lindsay f72c86ef58 Split securities into models 2017-12-05 05:59:44 -05:00
Aaron Lindsay 3f4d6d15a1 Split Sessions into models 2017-12-05 05:59:44 -05:00
Aaron Lindsay e70be1647c Begin splitting models from handlers with User 2017-12-05 05:59:44 -05:00
Aaron Lindsay 04d85cd681 Fix gorp to internally lowercase fields for Postgres
Postgres folds all unquoted column names to lowercase, and doing this
allows that to work nicely without screwing up the queries for the other
database engines.
2017-11-17 21:01:06 -05:00
Aaron Lindsay d5ca4395ac Move to gorp v2
This removes the following error, caused by the MySQL Dialect using a
'varchar' for all columns over 256 characters in length, instead of
'text' for the largest:

  2017/11/17 22:41:33 common_test.go:208: Error 1074: Column length too big for column 'Lua' (max = 21844); use BLOB or TEXT instead
2017-11-17 19:53:56 -05:00
Aaron Lindsay 5504d37482 testing: Improve testing CRUD for reports
Ensure we don't get silent errors if the Lua code is longer than the
database column, don't leave out the first report from testing, test
fetching multiple reports.
2017-11-03 20:50:19 -04:00
Aaron Lindsay 3869f3a3b2 Get all current tests to pass with MySQL
This is done by requiring 'parseTime=true' in the MySQL DSN's (required
by github.com/go-sql-driver/mysql when Scan()ing to time.Time's), and
not forcing update counts to match if rows were updated to what they
already were.
2017-10-24 20:57:55 -04:00
Aaron Lindsay e0ce1576cd Add first test
This tests only querying security templates, and not very exhaustively,
but it's a test!
2017-10-05 08:06:08 -04:00
Aaron Lindsay d0a5980b85 First pass at reorganizing go code into sub-packages 2017-10-04 19:35:59 -04:00