Skip to content

Commit dbdf19f

Browse files
author
Paul Robinson
committed
mgerge remote-tracking branch 'upstream/master'
2 parents c30fed3 + 8af6bb5 commit dbdf19f

38 files changed

+2648
-1291
lines changed

.eslintrc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"extends": "loopback",
3+
"rules": {
4+
"max-len": ["error", 120, 4, {
5+
"ignoreComments": true,
6+
"ignoreUrls": true,
7+
"ignorePattern": "^\\s*var\\s.=\\s*(require\\s*\\()|(/)"
8+
}],
9+
"camelcase": 0,
10+
"one-var": "off",
11+
"no-unused-expressions": "off",
12+
"operator-linebreak": "off"
13+
}
14+
}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,5 @@ results
1717

1818
npm-debug.log
1919
docs
20+
21+

CHANGES.md

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,90 @@
1+
2016-10-14, Version 2.7.0
2+
=========================
3+
4+
* Add connectorCapabilities global object (#179) (Nicholas Duffy)
5+
6+
* Accept PGDATABASE env var in test/init.js (#178) (Simon Ho)
7+
8+
* Remove unused prefix from test env vars (#176) (Simon Ho)
9+
10+
* Fix #123: Set default value during autoupdate. (#167) (Samuel Reed)
11+
12+
* Update translation files - round#2 (#170) (Candy)
13+
14+
* Add translated files (gunjpan)
15+
16+
* Update deps to loopback 3.0.0 RC (Miroslav Bajtoš)
17+
18+
* Use juggler@3 for running tests (Candy)
19+
20+
* Add eslint infrastructure (Loay)
21+
22+
* Revert "Add eslint infrastructure" (Loay)
23+
24+
* Fix CI Failure (Loay)
25+
26+
* test: accept more env vars on CI (Ryan Graham)
27+
28+
* test: use 'emptytest' database as default (Ryan Graham)
29+
30+
* test: seed DB with test schema before running (Ryan Graham)
31+
32+
* test: separate dbconfig from datasource (Ryan Graham)
33+
34+
* test: replace tables.sql with full schema dump (Ryan Graham)
35+
36+
* Refactor (jannyHou)
37+
38+
* Upgrade version (jannyHou)
39+
40+
* Globalize discover.js (jannyHou)
41+
42+
* Update URLs in CONTRIBUTING.md (#150) (Ryan Graham)
43+
44+
45+
2016-06-23, Version 2.6.3
46+
=========================
47+
48+
* Fix the datasource init (Raymond Feng)
49+
50+
51+
2016-06-23, Version 2.6.2
52+
=========================
53+
54+
55+
56+
2016-06-23, Version 2.6.1
57+
=========================
58+
59+
* Fix for https://github.com/strongloop/loopback-connector-postgresql/issues/145 (Raymond Feng)
60+
61+
62+
2016-06-22, Version 2.6.0
63+
=========================
64+
65+
* Upgrade to pg 6.0.0 (Raymond Feng)
66+
67+
68+
2016-06-21, Version 2.5.0
69+
=========================
70+
71+
* update/insert copyright notices (Ryan Graham)
72+
73+
* relicense as Artistic-2.0 only (Ryan Graham)
74+
75+
* Lazy connect when booting from swagger (juehou)
76+
77+
* Fix typo in SET NOT NULL migration. (Jonas Peter Hyatt)
78+
79+
* Reverts previous change (jimmylimm)
80+
81+
* Revert "Moves the default back to VARCHAR(1024) from text" (James Limmer)
82+
83+
* Moves the default back to VARCHAR(1024) from text (James Limmer)
84+
85+
* - Adds support for long JSON strings when using `embedOne` from other models. - Converts JSON columns to TEXT for extra length allowance (James Limmer)
86+
87+
188
2016-02-19, Version 2.4.1
289
=========================
390

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,5 +147,5 @@ Contributing to `loopback-connector-postgresql` is easy. In a few simple steps:
147147
inaccurate in any respect. Email us at [email protected].
148148
```
149149

150-
[Google C++ Style Guide]: https://google-styleguide.googlecode.com/svn/trunk/cppguide.xml
151-
[Google Javascript Style Guide]: https://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
150+
[Google C++ Style Guide]: https://google.github.io/styleguide/cppguide.html
151+
[Google Javascript Style Guide]: https://google.github.io/styleguide/javascriptguide.xml

LICENSE.md

Lines changed: 207 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,210 @@
1-
Copyright (c) 2013-2015 StrongLoop, Inc.
1+
Copyright (c) IBM Corp. 2013,2016. All Rights Reserved.
2+
Node module: loopback-connector-postgresql
3+
This project is licensed under the Artistic License 2.0, full text below.
24

3-
loopback-connector-postgresql uses a dual license model.
5+
--------
46

5-
You may use this library under the terms of the [Artistic 2.0 license][],
6-
or under the terms of the [StrongLoop Subscription Agreement][].
7+
The Artistic License 2.0
78

8-
[Artistic 2.0 license]: http://opensource.org/licenses/Artistic-2.0
9-
[StrongLoop Subscription Agreement]: http://strongloop.com/license
9+
Copyright (c) 2000-2006, The Perl Foundation.
10+
11+
Everyone is permitted to copy and distribute verbatim copies
12+
of this license document, but changing it is not allowed.
13+
14+
Preamble
15+
16+
This license establishes the terms under which a given free software
17+
Package may be copied, modified, distributed, and/or redistributed.
18+
The intent is that the Copyright Holder maintains some artistic
19+
control over the development of that Package while still keeping the
20+
Package available as open source and free software.
21+
22+
You are always permitted to make arrangements wholly outside of this
23+
license directly with the Copyright Holder of a given Package. If the
24+
terms of this license do not permit the full use that you propose to
25+
make of the Package, you should contact the Copyright Holder and seek
26+
a different licensing arrangement.
27+
28+
Definitions
29+
30+
"Copyright Holder" means the individual(s) or organization(s)
31+
named in the copyright notice for the entire Package.
32+
33+
"Contributor" means any party that has contributed code or other
34+
material to the Package, in accordance with the Copyright Holder's
35+
procedures.
36+
37+
"You" and "your" means any person who would like to copy,
38+
distribute, or modify the Package.
39+
40+
"Package" means the collection of files distributed by the
41+
Copyright Holder, and derivatives of that collection and/or of
42+
those files. A given Package may consist of either the Standard
43+
Version, or a Modified Version.
44+
45+
"Distribute" means providing a copy of the Package or making it
46+
accessible to anyone else, or in the case of a company or
47+
organization, to others outside of your company or organization.
48+
49+
"Distributor Fee" means any fee that you charge for Distributing
50+
this Package or providing support for this Package to another
51+
party. It does not mean licensing fees.
52+
53+
"Standard Version" refers to the Package if it has not been
54+
modified, or has been modified only in ways explicitly requested
55+
by the Copyright Holder.
56+
57+
"Modified Version" means the Package, if it has been changed, and
58+
such changes were not explicitly requested by the Copyright
59+
Holder.
60+
61+
"Original License" means this Artistic License as Distributed with
62+
the Standard Version of the Package, in its current version or as
63+
it may be modified by The Perl Foundation in the future.
64+
65+
"Source" form means the source code, documentation source, and
66+
configuration files for the Package.
67+
68+
"Compiled" form means the compiled bytecode, object code, binary,
69+
or any other form resulting from mechanical transformation or
70+
translation of the Source form.
71+
72+
73+
Permission for Use and Modification Without Distribution
74+
75+
(1) You are permitted to use the Standard Version and create and use
76+
Modified Versions for any purpose without restriction, provided that
77+
you do not Distribute the Modified Version.
78+
79+
80+
Permissions for Redistribution of the Standard Version
81+
82+
(2) You may Distribute verbatim copies of the Source form of the
83+
Standard Version of this Package in any medium without restriction,
84+
either gratis or for a Distributor Fee, provided that you duplicate
85+
all of the original copyright notices and associated disclaimers. At
86+
your discretion, such verbatim copies may or may not include a
87+
Compiled form of the Package.
88+
89+
(3) You may apply any bug fixes, portability changes, and other
90+
modifications made available from the Copyright Holder. The resulting
91+
Package will still be considered the Standard Version, and as such
92+
will be subject to the Original License.
93+
94+
95+
Distribution of Modified Versions of the Package as Source
96+
97+
(4) You may Distribute your Modified Version as Source (either gratis
98+
or for a Distributor Fee, and with or without a Compiled form of the
99+
Modified Version) provided that you clearly document how it differs
100+
from the Standard Version, including, but not limited to, documenting
101+
any non-standard features, executables, or modules, and provided that
102+
you do at least ONE of the following:
103+
104+
(a) make the Modified Version available to the Copyright Holder
105+
of the Standard Version, under the Original License, so that the
106+
Copyright Holder may include your modifications in the Standard
107+
Version.
108+
109+
(b) ensure that installation of your Modified Version does not
110+
prevent the user installing or running the Standard Version. In
111+
addition, the Modified Version must bear a name that is different
112+
from the name of the Standard Version.
113+
114+
(c) allow anyone who receives a copy of the Modified Version to
115+
make the Source form of the Modified Version available to others
116+
under
117+
118+
(i) the Original License or
119+
120+
(ii) a license that permits the licensee to freely copy,
121+
modify and redistribute the Modified Version using the same
122+
licensing terms that apply to the copy that the licensee
123+
received, and requires that the Source form of the Modified
124+
Version, and of any works derived from it, be made freely
125+
available in that license fees are prohibited but Distributor
126+
Fees are allowed.
127+
128+
129+
Distribution of Compiled Forms of the Standard Version
130+
or Modified Versions without the Source
131+
132+
(5) You may Distribute Compiled forms of the Standard Version without
133+
the Source, provided that you include complete instructions on how to
134+
get the Source of the Standard Version. Such instructions must be
135+
valid at the time of your distribution. If these instructions, at any
136+
time while you are carrying out such distribution, become invalid, you
137+
must provide new instructions on demand or cease further distribution.
138+
If you provide valid instructions or cease distribution within thirty
139+
days after you become aware that the instructions are invalid, then
140+
you do not forfeit any of your rights under this license.
141+
142+
(6) You may Distribute a Modified Version in Compiled form without
143+
the Source, provided that you comply with Section 4 with respect to
144+
the Source of the Modified Version.
145+
146+
147+
Aggregating or Linking the Package
148+
149+
(7) You may aggregate the Package (either the Standard Version or
150+
Modified Version) with other packages and Distribute the resulting
151+
aggregation provided that you do not charge a licensing fee for the
152+
Package. Distributor Fees are permitted, and licensing fees for other
153+
components in the aggregation are permitted. The terms of this license
154+
apply to the use and Distribution of the Standard or Modified Versions
155+
as included in the aggregation.
156+
157+
(8) You are permitted to link Modified and Standard Versions with
158+
other works, to embed the Package in a larger work of your own, or to
159+
build stand-alone binary or bytecode versions of applications that
160+
include the Package, and Distribute the result without restriction,
161+
provided the result does not expose a direct interface to the Package.
162+
163+
164+
Items That are Not Considered Part of a Modified Version
165+
166+
(9) Works (including, but not limited to, modules and scripts) that
167+
merely extend or make use of the Package, do not, by themselves, cause
168+
the Package to be a Modified Version. In addition, such works are not
169+
considered parts of the Package itself, and are not subject to the
170+
terms of this license.
171+
172+
173+
General Provisions
174+
175+
(10) Any use, modification, and distribution of the Standard or
176+
Modified Versions is governed by this Artistic License. By using,
177+
modifying or distributing the Package, you accept this license. Do not
178+
use, modify, or distribute the Package, if you do not accept this
179+
license.
180+
181+
(11) If your Modified Version has been derived from a Modified
182+
Version made by someone other than you, you are nevertheless required
183+
to ensure that your Modified Version complies with the requirements of
184+
this license.
185+
186+
(12) This license does not grant you the right to use any trademark,
187+
service mark, tradename, or logo of the Copyright Holder.
188+
189+
(13) This license includes the non-exclusive, worldwide,
190+
free-of-charge patent license to make, have made, use, offer to sell,
191+
sell, import and otherwise transfer the Package with respect to any
192+
patent claims licensable by the Copyright Holder that are necessarily
193+
infringed by the Package. If you institute patent litigation
194+
(including a cross-claim or counterclaim) against any party alleging
195+
that the Package constitutes direct or contributory patent
196+
infringement, then this Artistic License to you shall terminate on the
197+
date that such litigation is filed.
198+
199+
(14) Disclaimer of Warranty:
200+
THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS
201+
IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED
202+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
203+
NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL
204+
LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL
205+
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
206+
DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF
207+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
208+
209+
210+
--------

example/app.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
1+
// Copyright IBM Corp. 2013. All Rights Reserved.
2+
// Node module: loopback-connector-postgresql
3+
// This file is licensed under the Artistic License 2.0.
4+
// License text available at https://opensource.org/licenses/Artistic-2.0
5+
6+
'use strict';
17
var DataSource = require('loopback-datasource-juggler').DataSource;
28

39
var config = require('rc')('loopback', {dev: {postgresql: {}}}).dev.postgresql;
410

511
var ds = new DataSource(require('../'), config);
612

713
function show(err, models) {
8-
if (err) {
9-
console.error(err);
10-
} else {
11-
models.forEach(function(m) {
12-
console.dir(m);
13-
});
14-
}
14+
if (err) {
15+
console.error(err);
16+
} else {
17+
models.forEach(function(m) {
18+
console.dir(m);
19+
});
20+
}
1521
}
1622

17-
1823
ds.discoverModelDefinitions({views: true, limit: 20}, show);
1924

2025
ds.discoverModelProperties('product', show);
@@ -55,6 +60,4 @@ ds.discoverAndBuildModels('INVENTORY', {owner: 'STRONGLOOP', visited: {}, associ
5560
});
5661
});
5762
58-
5963
*/
60-

0 commit comments

Comments
 (0)