Joakim Fernstad
6022d471e3
Fix area plural issue, add testcase
...
- Fix #168
2017-06-27 12:56:13 +02:00
Aaron L
8aa4e2148c
Use _ to avoid reserved words in func args
...
- Fix #107
2017-02-24 22:27:05 -08:00
Patrick O'brien
cea636ef54
Update makeStringMap test
2016-11-12 16:02:39 +10:00
Aaron L
ede97dea5b
Add enum const generation
...
- Make postgres name its enums
- Add way to filter columns by whether or not they're an enum
- Split parsing of enums into name & values
- Add strmangle check functions: IsEnumNormal, ShouldTitleCaseEnum
- Add new strmangle enum functions to template test
- Implement a set type called "once" inside the templates so that we can
ensure certain things only generate one time via some unique name.
2016-11-11 01:06:30 -08:00
Aaron L
d27823de53
Add enum string parsing
2016-11-09 23:45:11 -08:00
Aaron L
912693a124
Update parameter generation for mysql
2016-09-12 23:28:23 -07:00
Aaron L
8392a4ba2a
Fix quoting throughout templates
...
- Use "" style strings for all templates
- Attach a Quote and SchemaTable that understand escaped quotes so we
can use "" style strings without repercussion.
- Make SchemaTable use escaped quotes
- Remove schemaTable from the templates in favor of .SchemaTable
2016-09-11 23:50:11 -07:00
Patrick O'brien
793522650c
Add lq, rq, and indexplaceholders args everywhere
2016-09-10 05:15:50 +10:00
Patrick O'brien
4e8191b8dd
Add struct tags flag
2016-09-04 23:44:54 +10:00
Patrick O'brien
09fb8005f6
Add TitleCase cache
2016-09-02 17:55:16 +10:00
Aaron L
2d0924a625
Remove a bunch of unused code.
...
- Optimize the TitleCaseIdentifier loop
2016-08-31 21:34:10 -07:00
Patrick O'brien
96d40fcfe4
Add automatic timestamps for created_at/updated_at
...
* Update and Insert
* Add --no-auto-timestamps flag
2016-08-29 00:12:37 +10:00
Aaron L
1e66a194bd
Fix one more problem.
2016-08-21 23:00:22 -07:00
Aaron L
248c45d1f6
Optimize TitleCase more.
...
- Remove support for insane cases of 9test as well as id9e9
- Code cleanup
2016-08-21 22:49:57 -07:00
Patrick O'brien
c4526d4d2c
Optimize TitleCase
2016-08-22 13:50:54 +10:00
Patrick O'brien
cd7e45efaa
Fix bugs for table only containing composite pkey
...
* Add more tables to test schema
* Add string slice match helper
2016-08-21 15:44:49 +10:00
Patrick O'brien
984e5f9bac
Uppercase any non-words (words w/o vowels aeiouy)
...
* This lets us find accronyms easily, example:
db, ssn, tx, etc.
2016-08-15 19:51:00 +10:00
Aaron L
c278bb6667
Remove unused code from templates
2016-08-14 00:43:30 -07:00
Aaron L
ab88d8511d
Move string set operations to strmangle
...
- Delete MakeDBName (unused)
- Rename HasElement to SetInclude
2016-08-13 16:34:02 -07:00
Patrick O'brien
799c35125f
Move DriverUsesLastInsertID to correct package
2016-08-14 00:07:22 +10:00
Patrick O'brien
ddb3aff125
BufPool Singular and Plural
2016-08-13 23:39:13 +10:00
Patrick O'brien
e4800f9af8
BufPool for Identifier
2016-08-13 23:30:53 +10:00
Patrick O'brien
d92a439c54
Modify postgres query to get is_unique for indexes
...
* Remove unused SnakeCase function
* Fix formatting bug in relationship structs
2016-08-13 17:30:55 +10:00
Patrick O'brien
3431919269
Fix broken whereclause test
2016-08-09 18:11:28 +10:00
Patrick O'brien
2ece7d14f6
Clean up helpers, remove duplicate funcs
...
* Refactor DeleteAll for slice
2016-08-09 15:57:54 +10:00
Aaron L
8e3c1d41da
GenerateParamFlags -> Placeholders
...
- Rewrite Placeholders to not use as much wizardry and magnetism
2016-08-08 20:19:26 -07:00
Aaron L
a98e474c9c
Refactor WhereMultiple into new WhereClause
2016-08-08 19:33:10 -07:00
Aaron L
b1d1b30724
Fix where clauses for templates
2016-08-08 17:36:37 -07:00
Aaron L
005218d61f
Add WhereMultiple
...
- Change the order of the args in WhereClause to support varargs
2016-08-08 17:36:37 -07:00
Aaron L
097de57e59
Add InClause
2016-08-08 17:36:37 -07:00
Patrick O'brien
fa8e431349
Add ReloadAll for ObjectSlice
...
* Fix RandomizeSlice bug overwriting blacklisted columns
* Add GroupAt param to param flags generator
2016-08-08 23:30:29 +10:00
Patrick O'brien
15ea874a75
Add SnakeCase
2016-08-08 09:34:11 +10:00
Aaron L
01124d9d0b
Add IdentQuoteSlice
2016-08-03 21:46:58 -07:00
Aaron L
20fe91c398
Make identquote understand *
2016-08-03 19:19:09 -07:00
Patrick O'brien
775c5ba369
Fix IdentQuote bug, add Reload helpers
2016-08-02 20:00:00 +10:00
Patrick O'brien
fb8540af1a
Change to IdentQuote, add IdentQuote to Select QM
2016-08-02 13:25:02 +10:00
Patrick O'brien
b171fd42ba
Add smart quote helper
2016-08-02 12:55:40 +10:00
Patrick O'brien
01228b4e26
Add stack implementation for SmartQuote
2016-08-01 17:41:52 +10:00
Patrick O'brien
8a2373b354
Add more uppercase words to titlecase
2016-07-17 13:33:16 +10:00
Patrick O'brien
4036786b6a
Got insert testing in a better state
...
* Split up insert function for testing
* Add DBType to global state
* Move test reflection helpers to testing.go
* Add incremental seed to randomizeField to avoid duplicate constraint
error messages
* Fixed Viper SSL default bug
* Fixed pgpass SSL inclusion bug
* Add MakeStringMap strmangle helper
* Change test errors from error to skip
2016-07-14 02:51:40 +10:00
Aaron L
ce30724f98
Add identifier function for use in templates.
2016-07-01 15:58:51 -07:00
Aaron L
6dac631a93
Add new functions to support more templating
...
- Add joinSlices
- Add ways to pull apart a slice of SQLColumnDef
- Try to stop generating join tables (but it still gens for some reason)
2016-06-26 23:59:27 -07:00
Aaron L
49d3260dcd
Fix where clause so it outputs quotes.
...
- Fix templates that this change broke
2016-06-26 23:56:45 -07:00
Aaron L
60f6080e73
Refactor dbdrivers into two packages
...
- Break dbdrivers into bdb and drivers
- Break each type in dbdrivers into it's own file set.
2016-06-22 23:11:32 -07:00
Aaron L
119e683952
Use extensive piping throughout the templates
...
- Haskell ftw
2016-06-19 22:22:50 -07:00
Aaron L
7c2a04ba4d
Clean up ridiculous amount of strmangle
2016-06-19 18:45:33 -07:00
Aaron L
30ece150e7
Fix strmangle's AutoIncPrimaryKey function.
...
- It's test was also a dead unicorn of unhappiness.
2016-06-19 17:17:09 -07:00
Aaron L
2819c1c889
Fix some missing parallels
2016-06-19 14:50:35 -07:00
Patrick O'brien
7aba7104a5
Fix null package imports, finish Bind
...
* Fix randomizeStruct time randomization
* Defer close sql.Rows
* Begin Delete test template
2016-06-08 15:45:34 +10:00
Patrick O'brien
8f3ff66339
Finished insert and update, added UpdateAt
2016-05-06 19:31:51 +10:00