58 Commits

Author SHA1 Message Date
Jim Lambert
53225196f4 document the use of CGO 2020-02-14 15:23:26 -05:00
Jim Lambert
fcf28d130a remove dep on matryer/is 2020-02-14 15:21:45 -05:00
Jim Lambert
689be5853e really basic test for the dialect 2020-02-14 15:12:59 -05:00
Jim Lambert
665549e1bc some how-to and why documentation 2020-02-14 15:12:39 -05:00
Jim Lambert
3f9a0298ab usage comment 2020-02-14 10:22:36 -05:00
Jim Lambert
422d37cfb7 changed package name to oci8 - just to skip the whole trademark thing 2020-02-14 10:18:09 -05:00
Jim Lambert
4d4f90d684 Revert "updated list of reserved words"
This reverts commit b126f0ab130941805e7bf534285c922af736edfa.
2020-02-14 09:40:21 -05:00
Jim Lambert
fe0ca50a57 properly handle fields of type 'text' and better handling of numeric type definitions 2020-02-14 09:39:29 -05:00
Jim Lambert
b126f0ab13 updated list of reserved words 2020-02-14 09:39:11 -05:00
Jim Lambert
d3ff7b40bb just mov funcs to top of file 2020-02-13 21:44:40 -05:00
Jim Lambert
42cc290cbd changed package name and a bunch of defect fixes 2020-02-13 21:29:38 -05:00
Jim Lambert
94020a2d29 better name 2020-02-13 21:28:34 -05:00
Jim Lambert
75e26884ef updated list 2020-02-13 21:28:18 -05:00
Jim Lambert
6ce772b948 better name 2020-02-13 21:28:07 -05:00
Jim Lambert
1ca41cc8b5 support quoting reserved words 2020-02-13 07:38:20 -05:00
Jim Lambert
de34a5f3a2 clean up types and deadcode 2020-02-12 14:44:04 -05:00
Jim Lambert
57dda4b080 clean up print stmts 2020-02-12 12:05:24 -05:00
Jim Lambert
b83dc38af2 fix foreign key stuff 2020-02-12 12:01:11 -05:00
Jim Lambert
4061744821 first attempt at a working dialect 2020-02-12 10:32:05 -05:00
Jim Lambert
2f2cc37ccc support for oracle 2020-02-11 11:00:21 -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
11e2819f44 Extract parseInt 2019-12-05 23:13:54 +08:00
zaneli
23f6840776 Add limit and offset parse error 2019-11-27 11:21:05 +09: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
Christian Muehlhaeuser
0c98e7d712 Fixed import formatting to match goimports (#2568) 2019-09-12 22:17:31 +08:00
zaneli
09a868b381 Handle syntax to specify an index prefix length 2019-04-20 01:04:23 +09: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
Louis Brauer
dbb25e9487 Adding json type for mssql dialect, similar to postgres.Jsonb (#1934)
* Adding json type for mssql dialect, similar to postgres.Jsonb

* Adding proper comments
2018-07-27 07:30:57 +08:00
ia
1907bff373 all: gofmt (#1956)
Run standard gofmt command on project root.

- go version go1.10.3 darwin/amd64

Signed-off-by: ia <isaac.ardis@gmail.com>
2018-06-25 13:06:58 +08:00
Olga Kleitsa
82eb9f8a5b included actual sql query to discover fi foreign key with the same name exists in a specific table of the database in use (#1896) 2018-05-12 01:29:00 -05:00
Jinzhu
3b2c4b3608 Fix insert with default value for mysql 2018-02-12 17:39:34 +08:00
Giuseppe
706b8f55da Use brackets for quoting (#1736) 2018-02-10 12:28:01 +08:00
Jinzhu
ae509ab237 Port AUTO_INCREMENT false support to mssql 2018-02-10 08:30:05 +08:00
Jinzhu
89a726ce5d Move ModifyColumn implemention to Dialect 2018-02-09 22:58:34 +08:00
daisy1754
38f96c6514 Add handling for empty Jsonb to fix #1649 (#1650) 2018-02-09 21:59:33 +08:00
Jinzhu
87fc1b2473 Refactor PR #1751 2018-02-03 20:27:19 +08:00
Aetheus
0a51f6cdc5 add JSONB type (#1626)
* add JSONB type

* add comments to satisfy gofmt
2017-10-10 08:28:39 -05:00
Jinzhu
969ab67636 [mssql] Fix save time struct's timezone 2017-08-11 17:18:49 +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
a870874bb5 Accept 0 as a value for Limit, Offset 2017-04-18 23:32:31 +08:00
Jinzhu
2a041971f9 Change bind var to 24652$ to avoid possible confliction 2017-04-18 16:13:02 +08:00
Jinzhu
5730b92954 Fix tests with mssql 2017-03-22 23:50:42 +08:00
John Mick
66982a7047 Remove SET_IDENTITY_INSERT for transactions in MS SQL
SET_IDENTITY_INSERT should be handled by each individual developer to avoid extra queries to the database.
2017-03-22 23:50:42 +08:00
Russ Egan
45f1a95051 Replace all use of *sql.DB with sqlCommon
Exporting sqlCommon as SQLCommon.

This allows passing alternate implementations of the database connection, or wrapping the connection with middleware.  This change didn't change any usages of the database variables.  All usages were already only using the functions defined in SQLCommon.

This does cause a breaking change in Dialect, since *sql.DB was referenced in the interface.
2017-03-14 17:02:14 -04:00
Craig Peterson
c3276eb221 fix issue with mssql NEXT option.
Fixes #1205
2017-02-21 14:23:01 -07: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
Jay Taylor
1485f4bce9 Use validated interface{} for limit/offset values to ensure values greater than
max 32-bit integer are addressable, and in a backwards-compatible way.
2016-06-23 06:29:51 -07:00
Jinzhu
f926dd9f9f Revert "Use int64 for limit/offset values to ensure values > 32-bit int are addressable." 2016-06-16 16:31:50 +08:00