Commit Graph

89 Commits

Author SHA1 Message Date
Andy Hanson
04b4272974 Merge remote-tracking branch 'origin/master' into merge_23sep 2016-09-23 07:24:23 -07:00
Artur Eshenbrener
1bd8a1e366 knex: type knex.fn helper (#11422)
As stated in sources, knex.fn contains only one function, `now()`, which returns `Raw`. As stated in documentation, `Raw` could be used as any value in query builder, so, this commit includes 2 changes:
1. Add `Raw` as one of case for type `Value`;
2. Introduce `FunctionHelper` interface (as in original source), which is returned by `knex.fn`.

https://github.com/tgriesser/knex/blob/master/src/functionhelper.js
http://knexjs.org/#Schema-timestamp (see Example section)
2016-09-23 21:41:17 +09:00
Artur Eshenbrener
964424bd7e knex: add withSchema method definition (#11421)
As documented here: http://knexjs.org/#Schema-withSchema, this commit adds `withSchema` method to `SchemaBuilder` interface
2016-09-23 21:27:31 +09:00
Andy Hanson
91d1d6d60f Merge remote-tracking branch 'origin/master' into merge_21sep 2016-09-21 09:45:05 -07:00
Artur Eshenbrener
b03987eb8c [knex] Fix MigratorConfig according to docs.
As described in http://knexjs.org/#Migrations-API,
there is no `database` config parameter and there is
`disableTransaction` parameter
2016-09-21 00:21:54 +03:00
zhengbli
c2a54db3e9 Merge branch 'master' into types-2.0
# Conflicts:
#	amcharts/AmCharts.d.ts
#	angular-gettext/angular-gettext.d.ts
#	angular-jwt/angular-jwt.d.ts
#	angular-material/angular-material.d.ts
#	angularjs/angular.d.ts
#	auth0-js/auth0-js.d.ts
#	aws-lambda/aws-lambda.d.ts
#	aws-sdk/aws-sdk.d.ts
#	azure-mobile-apps/azure-mobile-apps.d.ts
#	azure-mobile-services-client/AzureMobileServicesClient.d.ts
#	blessed/blessed-tests.ts
#	blessed/blessed.d.ts
#	bootbox/bootbox.d.ts
#	bowser/bowser.d.ts
#	cache-manager/cache-manager.d.ts
#	chai-things/chai-things.d.ts
#	colors/colors.d.ts
#	cordova/cordova-tests.ts
#	cordova/plugins/Contacts.d.ts
#	cordova/plugins/FileSystem.d.ts
#	couchbase/couchbase.d.ts
#	cucumber/cucumber-tests.ts
#	cucumber/cucumber.d.ts
#	d3/d3.d.ts
#	dojo/dojo.d.ts
#	dustjs-linkedin/dustjs-linkedin.d.ts
#	esprima/esprima.d.ts
#	express-serve-static-core/express-serve-static-core.d.ts
#	express-session/express-session.d.ts
#	fetch-mock/fetch-mock.d.ts
#	fs-extra/fs-extra.d.ts
#	fullCalendar/fullCalendar.d.ts
#	github-electron/github-electron.d.ts
#	gulp-uglify/gulp-uglify.d.ts
#	gulp/gulp.d.ts
#	highcharts/highcharts.d.ts
#	imap/imap.d.ts
#	incremental-dom/incremental-dom.d.ts
#	inversify/inversify.d.ts
#	ionic/ionic.d.ts
#	ioredis/ioredis.d.ts
#	isomorphic-fetch/isomorphic-fetch-tests.ts
#	jake/jake.d.ts
#	joi/joi.d.ts
#	jquery-mockjax/jquery-mockjax.d.ts
#	jquery/jquery.d.ts
#	js-data-http/js-data-http-tests.ts
#	js-data-http/js-data-http.d.ts
#	js-data/js-data.d.ts
#	jsdom/jsdom.d.ts
#	jsts/jsts-tests.ts
#	knex/knex.d.ts
#	koa-favicon/koa-favicon.d.ts
#	koa-router/koa-router-tests.ts
#	koa-router/koa-router.d.ts
#	lodash/lodash.d.ts
#	mailparser/mailparser.d.ts
#	maquette/maquette.d.ts
#	material-ui/material-ui.d.ts
#	matter-js/matter-js.d.ts
#	moment/moment.d.ts
#	mongoose-promise/mongoose-promise-tests.ts
#	mongoose/mongoose-tests.ts
#	mongoose/mongoose.d.ts
#	multer/multer.d.ts
#	ncp/ncp.d.ts
#	nock/nock.d.ts
#	node/node-tests.ts
#	node/node.d.ts
#	nvd3/nvd3.d.ts
#	object-assign/object-assign.d.ts
#	openlayers/openlayers.d.ts
#	parse/parse.d.ts
#	pdf/pdf.d.ts
#	pdfkit/pdfkit.d.ts
#	pg/pg.d.ts
#	pixi.js/pixi.js.d.ts
#	progress/progress.d.ts
#	pusher-js/pusher-js.d.ts
#	quill/quill-tests.ts
#	quill/quill.d.ts
#	radium/radium.d.ts
#	ravenjs/ravenjs-tests.ts
#	react-dropzone/react-dropzone.d.ts
#	react-mdl/react-mdl.d.ts
#	react-native/react-native.d.ts
#	react-notification-system/react-notification-system.d.ts
#	react-router/history-tests.ts
#	react-router/react-router-tests.tsx
#	react-router/react-router.d.ts
#	react-select/react-select-tests.tsx
#	react-select/react-select.d.ts
#	react/react.d.ts
#	redux-form/redux-form.d.ts
#	request-promise/request-promise.d.ts
#	resolve-from/resolve-from.d.ts
#	riot-api-nodejs/riot-api-nodejs.d.ts
#	sanitize-html/sanitize-html.d.ts
#	segment-analytics/segment-analytics.d.ts
#	simple-assign/simple-assign-tests.ts
#	simple-assign/simple-assign.d.ts
#	slate-irc/slate-irc.d.ts
#	soap/soap.d.ts
#	socket.io/socket.io.d.ts
#	sql.js/sql.js-tests.ts
#	sql.js/sql.js.d.ts
#	steam/steam.d.ts
#	stylus/stylus.d.ts
#	swiper/swiper.d.ts
#	tedious/tedious.d.ts
#	threejs/three.d.ts
#	twilio/twilio.d.ts
#	underscore/underscore.d.ts
#	ws/ws.d.ts
#	yeoman-generator/yeoman-generator.d.ts
2016-09-14 18:44:24 -07:00
Paul Oppenheim
1005f869a5 knex allows usage of Buffer types for values 2016-08-19 14:29:55 -07:00
Nathan Shively-Sanders
7171d15881 Merge pull request #10561 from lhecker/master
Added definitions for Bluebird 3.0
2016-08-15 06:29:16 -07:00
Nathan Shively-Sanders
14fb8ef536 Merge branch 'master' into types-2.0-2016-08-12 2016-08-12 14:53:54 -07:00
Oliver Joseph Ash
5458c8e4dc Fix 2016-08-12 18:09:15 +01:00
Oliver Joseph Ash
793ec09a5f Order 2016-08-12 17:53:07 +01:00
Oliver Joseph Ash
73748184ab Restore 2016-08-12 17:52:39 +01:00
Oliver Joseph Ash
eb1ed6bb54 Add test 2016-08-12 17:51:56 +01:00
Oliver Joseph Ash
601a2d4ae2 Knex: add missing transaction.raw 2016-08-12 17:50:16 +01:00
Jon Perl
876e78d5f5 Add missing jsonb column type to knex TableBuilder 2016-08-12 11:14:35 -04:00
Leonard Hecker
568ec4378d Fixed references to Bluebird 2.0 2016-08-11 13:13:12 +02:00
Emm
e0e0f509d5 Add search path config option to knex.js. 2016-08-10 21:18:31 +02:00
Emm
3fa4079527 Add useNullOrDefault config option to knex.js. 2016-08-10 21:18:31 +02:00
Mine Yalcinalp Starks
29e75d32e1 Merge remote-tracking branch 'upstream/master' into types2.0-fix 2016-08-05 17:32:30 -07:00
David Lee
cffa64e17f Add missing acquireConnectionTimeout parameter 2016-08-04 17:32:32 -05:00
Ryan Cavanaugh
b488f3cb5f Merge remote-tracking branch 'upstream/master' into merge_7_25 2016-07-27 10:57:46 -07:00
Ryan Cavanaugh
a4f5ae3098 Merge commit 'upstream/master~250' into merge_7_25 2016-07-26 18:03:56 -07:00
Ryan Cavanaugh
b9245fba39 Merge commit 'upstream/master~350' into merge_7_25 2016-07-26 17:24:39 -07:00
Ryan Cavanaugh
c73630c9a3 Merge commit 'upstream/master~400' into merge_7_25
# Conflicts:
#	angular-translate/angular-translate.d.ts
#	knex/knex.d.ts
#	redux-logger/index.d.ts
#	simplestorage.js/index.d.ts
#	underscore/underscore.d.ts
#	yargs/yargs.d.ts
2016-07-26 13:53:00 -07:00
Ryan Cavanaugh
e94e9a8630 Merge commit 'upstream/master~450' into merge_7_25 2016-07-26 13:40:56 -07:00
Ryan Cavanaugh
11d624e656 Merge commit 'upstream/master~500' into merge_7_25 2016-07-26 12:17:32 -07:00
Ryan Cavanaugh
5d004be8ba Merge commit 'upstream/master~600' into merge_7_25 2016-07-26 00:22:12 -07:00
Ryan Cavanaugh
5e9440c8ad Merge commit 'upstream/master~700' into merge_7_25
# Conflicts:
#	angular-ui-router/angular-ui-router.d.ts
#	bookshelf/bookshelf-tests.ts
#	bookshelf/bookshelf.d.ts
#	enzyme/enzyme-tests.tsx
#	enzyme/enzyme.d.ts
#	escodegen/escodegen-tests.ts
#	helmet/helmet.d.ts
#	joi/joi.d.ts
#	knex/knex-tests.ts
#	moment/index.d.ts
#	mongoose/index.d.ts
#	pg/pg.d.ts
#	react-select/react-select-tests.tsx
#	soap/index.d.ts
#	ssh2/ssh2.d.ts
#	turf/turf-tests.ts
#	underscore.string/underscore.string.d.ts
2016-07-25 16:10:34 -07:00
Ryan Cavanaugh
35075752ec Merge commit 'upstream/master~750' into merge_7_25 2016-07-25 14:51:03 -07:00
Ryan Cavanaugh
347311a5f0 Partial merge remote-tracking branch 'upstream/master' into merge_7_25 2016-07-25 14:26:20 -07:00
Ruben Slabbert
13837166f1 Knex.js: Added TableName type and changed join bindings (#10227) 2016-07-23 23:25:36 -07:00
Ryan Cavanaugh
a5f4d50ccc Fix tsconfig files for new option name / behavior.
Also fixes some inconsistent whitespace.
2016-07-12 13:54:56 -07:00
Travis Hill
19cc1c2dda Fixed formatting 2016-07-05 09:42:23 -04:00
Travis Hill
18396bd284 Added missing methods to JoinClause object 2016-07-05 09:40:51 -04:00
Raghav Katyal
395c4e1639 Turning on consistent casing flag and fixing failures 2016-06-30 15:14:49 -07:00
Travis Hill
696537ab6e Knex - Added more definitions
Added additional overloads for the Join interface and extra description for the callback function, including a description of the parameter passed to it, which is an instance of JoinClause. Therefore, also added the JoinClause interface description. Finally, added two new method overloads for Where.
2016-06-22 15:39:10 -04:00
Travis Hill
d1b270f02a Added missing WHERE methods
Added missing WHERE methods and one missing HAVING method (`andHaving`). Reordered some WHERE methods to be more consistent.
2016-06-21 14:48:16 -04:00
Mohamed Hegazy
2f4ad65f54 Merge pull request #9698 from slathrop/master
Add public Knex APIs: TableBuilder.bigIncrements, SchemaBuilder.createTableIfNotExists, QueryBuilder.on()
2016-06-20 13:28:08 -07:00
Alexander Sychev
7ad54fcef1 Missed an existing knex schema method (#9689)
See: http://knexjs.org/#Schema-createTableIfNotExists
2016-06-19 12:22:37 +09:00
Scott Bessler
9dba999267 [knex] allow object for .raw parameters (see http://knexjs.org/#Raw-Bindings) (#9674) 2016-06-19 11:37:05 +09:00
SLathrop
229eb44eaf Add public Knex API QueryBuilder.on() event hook 2016-06-18 17:25:18 -04:00
SLathrop
74ae4799a8 Add public Knex API SchemaBuilder.createTableIfNotExists 2016-06-17 13:55:30 -04:00
SLathrop
29a02fd8d4 Add public Knex API TableBuilder.bigIncrements 2016-06-17 10:46:58 -04:00
Adam Charron
51ffec4ea3 Fix method .returning() and check if Promise exists before polyfilling it. (#9590)
* Check if Promise exists and fix returning

* Remove the bluebird check
2016-06-13 23:41:14 +09:00
thynson
512ffae8cc Support Array as Value type (#9382) 2016-05-26 22:38:10 +09:00
Tanguy Krotoff
bb5d8ea26c Improve bookshelf.d.ts and tests (#9297)
* Switch to ES6 imports

* Add attributes and length

* Various improvements + add more tests

- Fix destroy()
- Fix detach()
- Fix map()
- Add NotFoundError, NoRowsUpdatedError and NoRowsDeletedError on Model

* serialize() and toJSON() should return Object/Object[] instead of any

* Fix map()

* More tests taken from Bookshelf website + various fixes

- Fix Bookshelf.transaction return type
- Add id attribute on ModelBase
- Improve ModelBase.parse()
- Fix Model.query()
- Add a constructor to CollectionBase
- Fix CollectionBase.map()
- Fix Collection.attach()
- Fix Collection.query()
- Add Collection.EmptyError
- Fix LoadOptions and FetchOptions withRelated

* No need to specify Knex.QueryBuilder

* toJSON(): Object/Object[] is too restrictive, revert back to any/any[]

* Model.through() returns R, Collection.through() returns Collection<R>
2016-05-15 02:43:57 +09:00
Ryan Cavanaugh
14e9d0ffe2 Pluck was removed 2016-05-12 17:15:52 -07:00
Ryan Cavanaugh
e105eabd48 Remove invalid references 2016-05-10 16:27:59 -07:00
Ryan Cavanaugh
bfd400a8f8 Add noEmit to all config files 2016-05-10 12:24:49 -07:00
Ryan Cavanaugh
50387d4046 Change relative reference paths to types references. Errors incoming... 2016-05-09 18:06:27 -07:00