okhowang
120d39b4d6
use show statement in mysql dialect for compatibility for tencent tdsql ( #2643 )
2019-10-17 23:22:13 +08:00
Devin Samarin
d2007b3c82
Describe name of field for invalid SQL datatypes ( #2689 )
2019-10-17 22:56:19 +08:00
zaneli
09a868b381
Handle syntax to specify an index prefix length
2019-04-20 01:04:23 +09:00
Shunsuke Otani
7bc3561503
Don't set NULL if timestamp column is Primary Key ( #2332 )
2019-04-14 21:11:29 +08:00
Eyal Posener
123d4f50ef
lock TagSettings structure when modified ( #1796 )
...
The map is modified in different places in the code which results in race conditions
on execution.
This commit locks the map with read-write lock when it is modified
2018-09-10 07:11:00 +08:00
Jinzhu
3b2c4b3608
Fix insert with default value for mysql
2018-02-12 17:39:34 +08:00
Wing Gao
97495a5e40
Add new tag "not_auto_increment" to set a column can auto increase or not
2018-02-10 08:18:35 +08:00
Jinzhu
8d4e3e5a83
Use tag PRECISION to set time's precision for mysql
2018-02-09 23:18:47 +08:00
miyauchi
ae696d051f
corresponds timestamp precision for mysql
2018-02-09 23:05:15 +08:00
Jinzhu
89a726ce5d
Move ModifyColumn implemention to Dialect
2018-02-09 22:58:34 +08:00
Jinzhu
87fc1b2473
Refactor PR #1751
2018-02-03 20:27:19 +08:00
Jinzhu
802104cc7c
Use BuildKeyName to build db's index name
2018-02-02 22:01:31 +08:00
s-takehana
2ff44ee8d7
Fix regex in BuildForeignKeyName #1681 ( #1728 )
2018-01-31 16:32:36 +08:00
Jinzhu
d510c7e4b8
mysql only accept offset with limit together
2017-07-03 11:58:01 +08:00
Jinzhu
d395b35025
mysql only accept offset with limit together
2017-07-03 11:26:31 +08:00
Jinzhu
717654b31c
Merge pull request #1420 from ModelRocket/master
...
Adding more complete binary support for standard dialects
2017-04-19 15:35:50 +08:00
Rob Rodriguez
bae0799bd8
Adding better binary type support for common SQL dialects
2017-04-19 00:21:56 -07:00
Jinzhu
88a47176f3
Use tinyint to int8
2017-04-18 17:16:10 +08:00
Jinzhu
a3b8b332ed
Allow customize data type via ParseFieldStructForDialect
2017-01-15 21:45:17 +08:00
Jinzhu
b507cdf93d
Expose current database name API
2016-07-11 21:37:44 +08:00
Christophe de Vienne
328fe672c8
Test AUTO_INCREMENT only on postgres
...
Only the postgres dialect handles AUTO_INCREMENT on non-primary key.
So we skip the auto increment test for other dialects.
The mysql case is a little trickier because the simple presence of the
'AUTH_INCREMENT' tag produces a faulty 'CREATE TABLE' statement. Hence
we need to remove it when present.
2016-06-20 16:00:38 +02:00
Nikola Kovacs
7983fc6269
fix panic in AddForeignKey on mysql dialect
2016-05-22 09:58:37 +02:00
Nikola Kovacs
6eb73ae654
Fix too long foreign key names in mysql.
...
The dialect must define its own foreign key generator method.
The previous default is available as a method on gorm.DefaultForeignKeyNamer
and can be embedded in other dialects.
The mysql dialect uses the first 24 characters plus an sha1 hash of the
full key name if the key name is more than 64 characters.
2016-05-22 00:13:26 +02:00
Jinzhu
c669e4b791
Set AUTO_INCREMENT if field is an auto increment field
2016-05-04 10:37:31 +08:00
Nikola Kovacs
1ac3eedca1
fix mysql HasForeignKey
2016-03-22 13:49:22 +01:00
Jinzhu
60a859d966
Add check HasForeignKey method to dialect, also move mssql dialect to a separate repo as it is not well tested, close #832
2016-03-05 22:51:11 +08:00
Jinzhu
b6a2710a15
Don't execute SET IDENTITY_INSERT if dialect is not mssql
2016-03-05 21:24:54 +08:00
Jinzhu
4e8370e18b
Refactor dialect
2016-02-15 14:59:15 +08:00
Jinzhu
a7097106b1
Fix #784 set mysql datetime's type to NOT NULL
2016-02-14 22:42:17 +08:00
Jinzhu
f4456e139e
Register dialects
2016-02-14 18:06:42 +08:00
Jinzhu
d7455fa5b1
Refactor DataTypeOf for mysql
2016-02-14 13:34:32 +08:00
Jinzhu
552d9bf455
Refactor DataTypeOf for sqlite
2016-02-14 11:51:53 +08:00
Jinzhu
2dfd76d22b
Refactor DataTypeOf
2016-01-29 15:08:53 +08:00
Jinzhu
d92c5db9e7
Refactor dialect
2016-01-19 13:11:11 +08:00
Jinzhu
e159ca1914
Refactor dialect
2016-01-18 20:32:52 +08:00
Jinzhu
09f46f01b9
Refactor dialect
2016-01-16 22:01:04 +08:00