orange-orm 4.6.0 → 4.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -5
- package/dist/index.browser.mjs +4 -4
- package/dist/index.mjs +4 -4
- package/docs/changelog.md +4 -0
- package/package.json +3 -3
- package/src/sqlite/selectForUpdateSql.js +2 -2
- package/src/table/column/string/endsWithCore.js +1 -1
- package/src/table/query/singleQuery/negotiateExclusive.js +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<img src="./docs/orange.svg" alt="Orange ORM Logo" width="250"/>
|
|
3
3
|
</div>
|
|
4
4
|
|
|
5
|
-
The ultimate Object Relational Mapper for Node.js and
|
|
5
|
+
The ultimate Object Relational Mapper for Node.js, Bun and Deno, offering seamless integration with a variety of popular databases. Orange ORM supports both TypeScript and JavaScript, including both CommonJS and ECMAScript.
|
|
6
6
|
|
|
7
7
|
[](https://www.npmjs.org/package/orange-orm)
|
|
8
8
|
[](https://github.com/alfateam/orange-orm/actions)
|
|
@@ -1571,12 +1571,10 @@ const db = map.sqlite('demo.db');
|
|
|
1571
1571
|
getRows();
|
|
1572
1572
|
|
|
1573
1573
|
async function getRows() {
|
|
1574
|
-
const filter = db.order.lines.any(x => x.product.contains('guitar'));
|
|
1575
|
-
//equivalent syntax:
|
|
1576
|
-
// const filter = db.order.lines.product.contains('guitar');
|
|
1577
|
-
|
|
1578
1574
|
const rows = await db.order.getAll({
|
|
1579
1575
|
where: y => y.lines.any(x => x.product.contains('guitar'))
|
|
1576
|
+
//equivalent syntax:
|
|
1577
|
+
//where: x => x.lines.product.contains('guitar')
|
|
1580
1578
|
});
|
|
1581
1579
|
}
|
|
1582
1580
|
```
|
package/dist/index.browser.mjs
CHANGED
|
@@ -4366,7 +4366,7 @@ function requireEndsWithCore () {
|
|
|
4366
4366
|
var nullOperator = ' is ';
|
|
4367
4367
|
|
|
4368
4368
|
function endsWithCore(context, operator, column,arg,alias) {
|
|
4369
|
-
alias = quote(alias);
|
|
4369
|
+
alias = quote(context, alias);
|
|
4370
4370
|
operator = ' ' + operator + ' ';
|
|
4371
4371
|
var encoded = column.encode(context, arg);
|
|
4372
4372
|
if (encoded.sql() == 'null')
|
|
@@ -6074,7 +6074,7 @@ function requireNegotiateExclusive () {
|
|
|
6074
6074
|
function negotiateExclusive(context, table, alias, _exclusive) {
|
|
6075
6075
|
if (table._exclusive || _exclusive) {
|
|
6076
6076
|
var encode = getSessionSingleton(context, 'selectForUpdateSql');
|
|
6077
|
-
return encode(alias);
|
|
6077
|
+
return encode(context, alias);
|
|
6078
6078
|
}
|
|
6079
6079
|
return '';
|
|
6080
6080
|
}
|
|
@@ -12610,8 +12610,8 @@ function requireSelectForUpdateSql () {
|
|
|
12610
12610
|
hasRequiredSelectForUpdateSql = 1;
|
|
12611
12611
|
const quote = requireQuote$1();
|
|
12612
12612
|
|
|
12613
|
-
selectForUpdateSql = function(alias) {
|
|
12614
|
-
return ' FOR UPDATE OF ' + quote(alias);
|
|
12613
|
+
selectForUpdateSql = function(context, alias) {
|
|
12614
|
+
return ' FOR UPDATE OF ' + quote(context, alias);
|
|
12615
12615
|
};
|
|
12616
12616
|
return selectForUpdateSql;
|
|
12617
12617
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -4368,7 +4368,7 @@ function requireEndsWithCore () {
|
|
|
4368
4368
|
var nullOperator = ' is ';
|
|
4369
4369
|
|
|
4370
4370
|
function endsWithCore(context, operator, column,arg,alias) {
|
|
4371
|
-
alias = quote(alias);
|
|
4371
|
+
alias = quote(context, alias);
|
|
4372
4372
|
operator = ' ' + operator + ' ';
|
|
4373
4373
|
var encoded = column.encode(context, arg);
|
|
4374
4374
|
if (encoded.sql() == 'null')
|
|
@@ -6076,7 +6076,7 @@ function requireNegotiateExclusive () {
|
|
|
6076
6076
|
function negotiateExclusive(context, table, alias, _exclusive) {
|
|
6077
6077
|
if (table._exclusive || _exclusive) {
|
|
6078
6078
|
var encode = getSessionSingleton(context, 'selectForUpdateSql');
|
|
6079
|
-
return encode(alias);
|
|
6079
|
+
return encode(context, alias);
|
|
6080
6080
|
}
|
|
6081
6081
|
return '';
|
|
6082
6082
|
}
|
|
@@ -15495,8 +15495,8 @@ function requireSelectForUpdateSql$3 () {
|
|
|
15495
15495
|
hasRequiredSelectForUpdateSql$3 = 1;
|
|
15496
15496
|
const quote = requireQuote$6();
|
|
15497
15497
|
|
|
15498
|
-
selectForUpdateSql$3 = function(alias) {
|
|
15499
|
-
return ' FOR UPDATE OF ' + quote(alias);
|
|
15498
|
+
selectForUpdateSql$3 = function(context, alias) {
|
|
15499
|
+
return ' FOR UPDATE OF ' + quote(context, alias);
|
|
15500
15500
|
};
|
|
15501
15501
|
return selectForUpdateSql$3;
|
|
15502
15502
|
}
|
package/docs/changelog.md
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
## Changelog
|
|
2
|
+
__4.6.2__
|
|
3
|
+
Bugfix: crashed when combining endsWith filter with other filter: e.g. `endsWith('foo').or(...)`
|
|
4
|
+
__4.6.1__
|
|
5
|
+
Bugfix: No intellisense when running in browser mode . See [#125](https://github.com/alfateam/)
|
|
2
6
|
__4.6.0__
|
|
3
7
|
Support for Deno and Bun.
|
|
4
8
|
Using builtin sqlite for Node22++.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "orange-orm",
|
|
3
|
-
"version": "4.6.
|
|
3
|
+
"version": "4.6.2",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"browser": "./dist/index.browser.mjs",
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
".": {
|
|
9
9
|
"require": "./src/index.js",
|
|
10
10
|
"import": "./dist/index.mjs",
|
|
11
|
-
"browser": "./dist/index.browser.mjs"
|
|
11
|
+
"browser": "./dist/index.browser.mjs",
|
|
12
|
+
"types": "./src/index.d.ts"
|
|
12
13
|
}
|
|
13
14
|
},
|
|
14
15
|
"bin": {
|
|
@@ -16,7 +17,6 @@
|
|
|
16
17
|
},
|
|
17
18
|
"title": "Orange ORM",
|
|
18
19
|
"description": "Object Relational Mapper",
|
|
19
|
-
"types": "./src/index.d.ts",
|
|
20
20
|
"keywords": [
|
|
21
21
|
"typescript orm",
|
|
22
22
|
"orm",
|
|
@@ -3,7 +3,7 @@ var newBoolean = require('../newBoolean');
|
|
|
3
3
|
var nullOperator = ' is ';
|
|
4
4
|
|
|
5
5
|
function endsWithCore(context, operator, column,arg,alias) {
|
|
6
|
-
alias = quote(alias);
|
|
6
|
+
alias = quote(context, alias);
|
|
7
7
|
operator = ' ' + operator + ' ';
|
|
8
8
|
var encoded = column.encode(context, arg);
|
|
9
9
|
if (encoded.sql() == 'null')
|
|
@@ -3,7 +3,7 @@ var getSessionSingleton = require('../../getSessionSingleton');
|
|
|
3
3
|
function negotiateExclusive(context, table, alias, _exclusive) {
|
|
4
4
|
if (table._exclusive || _exclusive) {
|
|
5
5
|
var encode = getSessionSingleton(context, 'selectForUpdateSql');
|
|
6
|
-
return encode(alias);
|
|
6
|
+
return encode(context, alias);
|
|
7
7
|
}
|
|
8
8
|
return '';
|
|
9
9
|
}
|