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
419f2760c7
Change quotes to bytes
2016-09-10 03:30:46 +10:00
Patrick O'brien
9e6a3d5ee3
Add quote dialects
2016-09-10 03:14:18 +10:00
Patrick O'brien
1c8a9d2e39
Add schema feature to everything (except rels)
...
* Add strmangle SchemaTable helper
2016-09-09 07:23:10 +10:00
Patrick O'brien
4e8191b8dd
Add struct tags flag
2016-09-04 23:44:54 +10:00
Patrick O'brien
629ec8c8d0
Add hooks to eager load funcs
...
* Add PreserveDots text helper
* Fix bug using wrong XTitleCases name
2016-08-30 02:36:07 +10: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
Patrick O'brien
95ff24b918
Add --no-hooks feature
2016-08-28 20:48:50 +10:00
Aaron L
63fae21c51
Add base_dir to make it less ornerous to use
2016-08-23 21:50:41 -07:00
Aaron L
92c4e7f8f3
Support many_to_many eager loading properly
...
- Reorder the where statement in to_many to match eager loading.
2016-08-17 23:09:54 -07:00
Aaron L
c278bb6667
Remove unused code from templates
2016-08-14 00:43:30 -07:00
Aaron L
b0cd6828b2
Delete swaths of unused code
2016-08-14 00:20:34 -07:00
Aaron L
5f86014847
Remove a bunch dead code
2016-08-13 23:54:17 -07:00
Aaron L
944303f2f5
Properly abstract LastInsertID
2016-08-13 16:34:02 -07:00
Aaron L
ef03225024
Add primary key column gen
2016-08-13 16:34:02 -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
160c6ff0f0
Begin the pain
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
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
18029166c0
Add FilterColumnsByUnique, finish UpdateAll slice
...
* Add FilterColumnsByUnique
* Fix lots of broken tests
* Made CompareVals less stupid
Note: UpdateAll tests still broken because Unique
is not being fetched correctly for INDEX types,
it is only working for UNIQUE constraints.
2016-08-11 22:26:49 +10:00
Patrick O'brien
33286e648a
Update repo to add vattle org paths
2016-08-09 17:59:30 +10:00
Patrick O'brien
15ea874a75
Add SnakeCase
2016-08-08 09:34:11 +10:00
Patrick O'brien
afedc92224
Change Enforced to Validated
2016-08-03 14:22:32 +10:00
Patrick O'brien
c7c0fe5c0d
Add provision for enforced types, eg uuid
...
* Add enforced to column data
* Add enforced list to driver
* Fix bug in TitleCase (now uses regexp)
* Fix broken zero-value enforced type inserts by using RandomizeEnforcedStruct
2016-08-03 12:05:05 +10:00
Aaron L
1513661e15
New texts to reverse a "to_many" into "to_one"
2016-07-17 17:48:08 -07:00
Aaron L
e08eacad05
Stop dividing templates up, and execute by name
...
- This allows us to use templates defined from anywhere in other
templates.
2016-07-16 23:55:15 -07:00
Aaron L
fc5bbc3e2e
Use the cached relationship information
2016-07-16 13:02:35 -07:00
Patrick O'brien
7e17008f8d
Finish insert tests
...
* Add columnTypes helper
2016-07-15 22:26:45 +10:00
Aaron L
6ddef6095e
Rewrite to_one relationships with text helpers.
...
- Fix a gross if statement.
2016-07-14 21:48:59 -07:00
Aaron L
f764c979e7
Add some things to template functions.
2016-07-13 22:34:18 -07:00
Patrick O'brien
b7f8c132df
Refactored select tests
...
* Delete unecessary helpers
2016-07-14 14:12:26 +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
Patrick O'brien
013b3ae0f8
Added more reflect helpers
2016-07-09 02:39:36 +10:00
Patrick O'brien
0275677216
Merge branch 'master' of github.com:nullbio/sqlboiler
2016-07-06 16:04:54 +10:00
Patrick O'brien
7a0b84848f
Add more tests to insert template tests
...
* Add helpers to assist with template tests
* Change null []byte from string to []byte
2016-07-06 16:02:35 +10:00
Aaron L
0df0f964e7
Finish to_many for join tables.
2016-07-01 16:20:59 -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
c6740529df
Add more template functions.
...
- Fix some quoting nonsense in another template.
2016-06-26 23:56:45 -07:00
Aaron L
fee1231813
Push strmangle refactoring through everything.
2016-06-22 23:48:49 -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
4d0742b6f3
Fix up a number more template errors from refactor
...
- Add quoteWrap function to help where some of the old helpers were
covering.
2016-06-19 22:58:14 -07:00
Aaron L
119e683952
Use extensive piping throughout the templates
...
- Haskell ftw
2016-06-19 22:22:50 -07:00
Aaron L
f46c2c5337
Add relationship "to_one" template.
...
- Temporarily add some new helper functions, going to clean these all
up in favor of pipes
- Annotate a couple of super weird methods
- Fix a printf verb for err
2016-06-19 16:01:22 -07:00
Aaron L
56234e37a1
Move main back to root folder.
...
- Change everything to package main.
- Make main a little more user friendly.
2016-06-12 11:19:23 -07:00
Aaron L
8757c8a184
Refactor entire project :D
...
- Move most files to root
- Remove cmds directory in favor of cmd directory with binary
- Remove all cobra from main
2016-06-11 18:25:00 -07:00