Jim Lambert
81b1478ecf
refactor to use OraDialect interface
2020-02-15 16:11:36 -05:00
Jim Lambert
5c187bc757
refactor to be explicitly oci8
2020-02-15 11:32:40 -05:00
Jim Lambert
f2959c880e
rename to isOracle() so it is not public
2020-02-14 10:11:35 -05:00
Jim Lambert
ce1b20789c
handle string primary fields
2020-02-13 21:31:49 -05:00
Jim Lambert
77c36832c0
simply oracle test
2020-02-12 14:44:53 -05:00
Jim Lambert
57dda4b080
clean up print stmts
2020-02-12 12:05:24 -05:00
Jim Lambert
e56cd82358
deal with oracle's special handling of last inserted id
2020-02-12 10:37:13 -05:00
jaden
79a77d771d
go.mod: remove unnecessary dependences through upgrade go-mssqldb ( #2795 )
...
* go.mod: remove unnecessary dependences through upgrade go-mssqldb
$ go get -v -u github.com/denisenkom/go-mssqldb && go mod tidy -v
go: finding github.com/denisenkom/go-mssqldb latest
go: finding github.com/golang-sql/civil latest
go: finding golang.org/x/crypto latest
unused cloud.google.com/go
unused gopkg.in/check.v1
unused gopkg.in/yaml.v2
* mssql: use SCOPE_IDENTITY() if OUTPUT not possible
* go-mssqldb: find a up-to-date version pass test -race
2019-12-06 22:22:28 +08:00
Jinzhu
5490a87fe9
Should use global NowFunc when trace SQL
2019-12-06 00:01:40 +08:00
Alex Stockwell
820b5f244a
MSSQL Create() fix: Add LastInsertIDReturningSuffix to dialect ( #2690 )
...
* MSSQL Create() fix: Add LastInsertIDReturningSuffix to dialect
Per https://github.com/denisenkom/go-mssqldb/issues/355
* MSSQL Create() fix: Added OUTPUT query to Create() builder
2019-10-17 22:54:11 +08:00
Ruben de Vries
712c465560
add an override on the DB instance instead of using the global NowFunc. ( #2142 )
2019-06-10 20:45:42 +08:00
Ali Koyuncu
8b07437717
add mysql insert modifiers ( #2269 )
2019-03-10 20:17:21 +08:00
Jinzhu
dc3b2476c4
Don't save ignored fields into database
2018-09-10 06:03:41 +08:00
Jinzhu
3b2c4b3608
Fix insert with default value for mysql
2018-02-12 17:39:34 +08:00
Jinzhu
35fb16eeba
Don't overwrite existing timestamp when creating
2017-07-31 17:26:36 +08:00
Jinzhu
9edd66250e
Return error when creating with unaddressable record in postgres
2016-11-04 20:58:41 +08:00
Jinzhu
3425c1d38d
Set PrimaryField IsBlank to false after read from returning value
2016-09-13 08:24:29 +08:00
Jinzhu
bf0e236078
Fix get default value from blank primary field
2016-06-02 11:06:44 +08:00
Mark Oberemk
3b85ddcc9a
Properly quotes column names in post-insert SELECT
...
This commit closes #979 by fixing the post-insert SELECT call
2016-05-02 12:25:04 -04:00
Jinzhu
ec110657da
Refactor based on golint
2016-03-07 17:49:55 +08:00
Jinzhu
3055bad1e8
scope.Fields() return slice of *Field
2016-03-07 14:25:41 +08:00
Jinzhu
2522f03c1f
Set identity insert on after create transaction, close #841
2016-03-05 19:22:33 +08:00
Jinzhu
c9dfd80959
Support extra options for inserting, querying, deleting, updating SQL, close #721 , #769
2016-02-15 19:36:48 +08:00
Jinzhu
d92c5db9e7
Refactor dialect
2016-01-19 13:11:11 +08:00
Jinzhu
58a7252251
Refactor update callback
2016-01-17 19:57:03 +08:00
Jinzhu
92213273a5
Refactor create callback
2016-01-17 18:17:04 +08:00
Jinzhu
4f84bf0d94
Hide method QuoteIfPossible
2016-01-17 16:37:17 +08:00
Jinzhu
317e1a9a48
Keep refactoring callbacks
2016-01-17 16:28:32 +08:00
Jinzhu
31366f388f
Remove uncessary method CallMethodWithErrorCheck for Scope
2016-01-17 16:14:14 +08:00
Jinzhu
de73d30503
Refactor callbacks
2016-01-17 15:30:42 +08:00
Jinzhu
8e2aaa92c9
Rename Callbacks to Callback
2016-01-16 21:55:00 +08:00
Jinzhu
f1237e4fe9
Refactor Callback
2016-01-16 21:46:57 +08:00
Jinzhu
d53f5cf6dd
Rename scope.Trace to trace
2016-01-13 16:00:08 +08:00
Jinzhu
4c1a78bab7
Don't query all columns out from database after create, but only those has default value
2015-12-04 18:41:28 +08:00
Jinzhu
2a46856d52
Fix update fields having default with empty value
2015-09-14 23:41:14 +08:00
Jinzhu
b46ca62c18
Fix ReturningStr when with schema name, fixes #650
2015-09-11 06:36:17 +08:00
Jinzhu
a29230c86f
multpile foreign keys
2015-07-30 16:23:51 +08:00
Bojan Petrovic
d9faa4949c
Fix Create error reporting.
2015-06-04 14:23:57 +02:00
Bojan Petrovic
94f56e646b
Fix Create when dialect does not support last inserted id
2015-06-04 13:47:25 +02:00
Jinzhu
331d8ceabd
Don't overwrite primary key if already it is already exist
2015-06-01 11:09:58 +08:00
Jinzhu
187eae8d9c
Update with Select and Omit
2015-03-12 18:30:59 +08:00
Jinzhu
ad251b9deb
Create with Select
2015-03-12 17:47:31 +08:00
Jinzhu
49454839bd
Support Multi primary keys
2015-03-11 11:28:30 +08:00
Jinzhu
ce72988e96
Refactoring API for plugin system
2015-02-26 14:40:30 +08:00
Jinzhu
83ee11e184
Don't call callbacks if has error
2015-02-24 16:28:15 +08:00
Jinzhu
a97a508ec7
Raise error if using unaddressable value
2015-02-23 09:40:39 +08:00
Jinzhu
406a01875c
Test using pointer as struct fields
2015-02-20 22:06:49 +08:00
Jinzhu
5c478b46e1
Use Common Initialisms from golint
2015-02-18 10:36:32 +08:00
Jinzhu
0b32041135
Review and Refactor
2015-02-17 22:55:14 +08:00
Jinzhu
38cbff9c79
Refactor Associations
2015-02-17 20:19:47 +08:00