Stephan Peijnik
e5ca672742
Implement conditional generation of foreign keys.
...
For now, support is restricted to MySQL and PostgreSQL, while all other
DBMS default to the old behavior.
Signed-off-by: Stephan Peijnik <speijnik@anexia-it.com>
2016-02-03 12:33:51 +01:00
Jinzhu
611e613459
Merge pull request #709 from pacificporter/is_byte_array_or_slice
...
Fix panic() in isUUID()
2015-11-09 09:24:44 +08:00
Bruno Sato
b27ac1a996
I was breaking another case
...
EncryptedPassword []byte `json:"-" sql:"encrypted_password;not null"`
2015-11-06 18:55:56 -02:00
HARUYAMA Seigo
c68a386f91
Fix panic() in isUUID()
...
value with value.Kind() == reflect.Slice does not have value.Type().Len()
2015-11-01 01:15:06 +09:00
HARUYAMA Seigo
92f9584c83
Fix SqlTag() in case of ByteSlice
2015-10-31 16:23:55 +09:00
Yegor Wienski
3cb95264df
add binary UUID support to postgres
...
Check if the value is a byte array of 16 bytes and its type is named "uuid" or "guid", and if so, use postgres `uuid` type.
2015-10-28 18:05:09 +03:00
Jinzhu
b46ca62c18
Fix ReturningStr when with schema name, fixes #650
2015-09-11 06:36:17 +08:00
Jay Taylor
526fff01b7
Merge branch 'jay/current_database' into jay/ddl-errors
2015-08-11 09:05:53 -07:00
Jay Taylor
beeb040c62
Reworked CurrentDatabase API to return the name instead of `*gorm.DB'.
2015-08-11 08:59:59 -07:00
Jay Taylor
da31f58607
Ensure DDL dialect queries propagate error states to descendent scopes.
...
Includes relevant unit-test.
Branched from jay/current_database (please merge that branch first!).
2015-08-08 14:25:15 -07:00
Jay Taylor
70725f9d77
`CurrentDatabase' determines current dbname by querying the database.
...
Preserves the gorm-style query API.
2015-08-08 08:56:23 -07:00
Jinzhu
a0848909c2
Simplify dialect definitions
2015-03-17 10:40:42 +08:00
Jinzhu
a549b6bd49
Refactor SQL Tag
2015-03-11 17:05:58 +08:00
Jinzhu
3740a3beaa
Merge pull request #396 from ikawaha/fix/hstore_20150302
...
Fixed a bug that panic occurs when the value is null
2015-03-03 13:47:33 +08:00
Jinzhu
34997385b0
Add HasIndex method for dialect interface
2015-03-02 23:02:40 +08:00
ikawaha
360328b8c6
Fixed a bug that panic occurs when the value is null
2015-03-02 23:20:30 +09:00
Jinzhu
4e8d43dd4f
Refactor check HasTable, HasColumn
2015-02-28 17:01:27 +08:00
Jinzhu
ce72988e96
Refactoring API for plugin system
2015-02-26 14:40:30 +08:00
Jinzhu
0b32041135
Review and Refactor
2015-02-17 22:55:14 +08:00
Jinzhu
73b6f0eace
Linting according to golint
2015-02-17 08:34:01 +08:00
Jinzhu
aa8bc02c11
Fix broken test for postgres
2015-01-14 07:59:21 +08:00
Jay Taylor
2166649409
Ensure identifiers are quoted for RETURNING
and DROP INDEX
statements.
2015-01-13 15:27:35 -08:00
Paolo Galeone
d60322978a
Fixes https://github.com/jinzhu/gorm/issues/317
2014-12-17 22:41:00 +01:00
Paolo Galeone
21f4de584f
Use tableName.field or tableName.* in returning string
2014-12-08 12:03:42 +01:00
Joel Trost
a6b243a3e9
fix for bad rebase
2014-09-16 14:49:29 -07:00
Joel Trost
6b7d0879c5
Ran gofmt and removed panic statements
...
Unnecessary panics in create_test and delete_test removed
2014-09-16 14:24:55 -07:00
Joel Trost
f79e1a2ef6
GORM support for MSSQL, passes all tests
2014-09-16 14:21:35 -07:00
Jinzhu
2d125e035c
Fix check postgres has table
2014-08-29 06:22:59 +08:00
Jinzhu
14590a65dc
Save many to many relations into join table
2014-07-30 14:18:15 +08:00
Jinzhu
b929a082d7
Fix remove index for sqlite and postgres
2014-07-29 12:02:03 +08:00
Jimmy Wahlberg
d857685771
Fix error when deploying to google app engine
...
github.com/jinzhu/gorm/postgres.go:103:21: composite struct literal database/sql.NullString with unkeyed fields
2014-07-10 16:15:39 +02:00
Can Yucel
5f0e640f3d
add postgres hstore type support
2014-06-07 20:36:48 -07:00
Jinzhu
66e6c9af9f
Add method HasTable, HasColumn to dialect
2014-04-25 09:08:48 +08:00
Jinzhu
a46d149579
remove package dialect for easier contribution
2014-04-25 07:20:23 +08:00