zaneli
23f6840776
Add limit and offset parse error
2019-11-27 11:21:05 +09:00
Emir Beganović
81c17a7e25
Revert "Fix #2517 : Check for incomplete parentheses to prevent SQL injection." ( #2674 )
...
This reverts commit e3cc5ea4d4
.
2019-09-25 19:22:43 +08:00
Herpiko Dwi Aguno
e3cc5ea4d4
Fix #2517 : Check for incomplete parentheses to prevent SQL injection.
2019-06-25 16:21:45 +07:00
David Zhang
588e2eef5d
Fix typo in query_test ( #1977 )
2018-07-27 07:38:02 +08:00
Jinzhu
cfd1cc586a
Add 2D array support, close #1201
2018-02-13 08:33:11 +08:00
Jinzhu
30adc80edc
Test customize data type for primary key
2018-02-12 13:20:55 +08:00
Jinzhu
7a8c2bbff8
Refactor build SQL condition
2018-02-12 00:06:31 +08:00
Jinzhu
3c70f83833
Fix query test
2018-02-11 13:57:59 +08:00
Jinzhu
46269198a4
Refactor PR #1569
2018-02-11 13:41:46 +08:00
matematik7
36043ad905
Fix for quoted column names and add test
2018-02-11 13:11:54 +08:00
Jinzhu
fd15156d39
Fix Count in mssql for SQL with group
2018-02-11 09:16:10 +08:00
Jinzhu
b2b568daa8
Add tag association_autoupdate, association_autocreate, association_save_reference support
2018-02-10 17:34:02 +08:00
Jinzhu
08dba5378e
Fix typo in tests
2017-04-19 10:17:29 +08:00
Tino Diaz
d03afd173f
Fix empty string as order clause
2017-03-26 14:00:34 +01:00
Jinzhu
5730b92954
Fix tests with mssql
2017-03-22 23:50:42 +08:00
Jinzhu
c730b30a78
Fix "Unsupported destination" error when value is pointer of pointer
2017-02-07 08:32:18 +08:00
smacker
cf7fbb56d5
db.Raw().First() makes wrong sql fix #1214
2016-10-26 21:32:27 +07:00
Jinzhu
5d853fc53c
Fix null time not allowed in mysql5.7 test error
2016-10-19 12:20:45 +08:00
zardak
bcff1df589
Fix failing sqlite3 tests due to db connection not being closed
2016-08-07 13:00:06 +03:00
Jinzhu
c1c4f9f86e
Add ORDER BY sql expression support
2016-06-28 11:15:42 +08:00
Jinzhu
7c43d9fc36
Fix scan columns with same name
2016-03-10 17:35:19 +08:00
Jinzhu
dc435d2225
Merge branch 'master' into v1.0_dev
2016-02-08 22:08:02 +08:00
Jinzhu
0cf369dcff
Fix query IN with empty slice
2016-02-08 19:29:16 +08:00
Jinzhu
d92c5db9e7
Refactor dialect
2016-01-19 13:11:11 +08:00
Jinzhu
211ccf4ea6
Fix using pointer value as foreign key
2016-01-16 11:37:16 +08:00
James Kong
72104c6bf0
Fixes querying with inline map when a value is nil
...
This changes the inline map query build condition to use `IS NULL`
instead of the equality operator when the provided value is `nil`.
2016-01-15 16:38:56 -08:00
Henrique Menezes
e68fb8f9e2
Fix where clause for string primary key when query value is numeric and starts with zero
2015-10-16 00:49:47 -03:00
Jinzhu
1d4f908ea2
Fixed detecting pointers as a Scanner. thanks @NOX73
2015-08-12 22:28:01 +08: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
70725f9d77
`CurrentDatabase' determines current dbname by querying the database.
...
Preserves the gorm-style query API.
2015-08-08 08:56:23 -07:00
Jinzhu
e2e417a8c2
Fix complicated Select
2015-08-01 11:49:34 +08:00
Jinzhu
2d802c3445
Overwrite slice results with Find
2015-06-24 13:56:30 +08:00
Jinzhu
5d52826b3d
Create with Omit
2015-03-12 18:01:27 +08:00
Jinzhu
4c815fd2cc
Add add limit 1 for Find automatically
2015-03-12 12:01:53 +08:00
Constantin Schomburg
045b4d6d2a
Fix error when chaining empty where conditions
2015-01-04 13:47:25 +01:00
Jinzhu
0219fb1cc0
Don't raise error if no record found when find all
2014-12-19 11:50:34 +08:00
Jinzhu
1aaac379ae
Fix tests for mysql, postgres
2014-11-24 18:16:07 +08:00
jnfeinstein
429a100856
Add additional methods of specifying the 'select' portion of a query.
...
This commit adds more ways of specifying selects:
-) You can now pass in a []string. This is mostly for convenience,
since you may want to dynamically create a list of fields to be
selected.
-) You can now use variables. This is important because a select
could take user input. For example, finding a MAX between a record
and a given number could be easily done using select, and then
you don't have to process anything in backend logic. This is also
necessary to use postgres text search capabilities (which actaully
play nicely with the rest of gorm).
-) You can now chain select calls. This could be useful in
conjunction with gorm's scopes functionality.
2014-11-17 07:36:26 -05:00
Paolo Galeone
c108cf022b
Add support for signed and unsigned integer types as primary key type
2014-10-22 17:33:13 +02:00
Jinzhu
5eeff5d38f
Fix some errors for the mssql support pull request
2014-09-19 21:49:04 +08: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
423d9496c1
update tests
2014-08-28 16:14:44 +08:00
Jinzhu
39ac95adbb
Add InstanceSet, InstanceGet fomr Scope
2014-08-20 17:05:02 +08:00
Jinzhu
468e54f0ee
Refact tests
2014-07-29 16:04:40 +08:00
Jinzhu
cb7d545ac0
Refact tests
2014-07-29 11:38:28 +08:00