orange-orm 4.7.8 → 4.7.10-beta.0

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.
@@ -80,13 +80,13 @@ module.exports = function(table, name) {
80
80
 
81
81
  c.groupSum = (context, ...rest) => aggregateGroup.apply(null, [context, 'sum', c, table, ...rest]);
82
82
  c.groupAvg = (context, ...rest) => aggregateGroup.apply(null, [context, 'avg', c, table, ...rest]);
83
- c.groupMin = (context, ...rest) => aggregateGroup.apply(null, [context, 'min', c, table, ...rest]);
84
- c.groupMax = (context, ...rest) => aggregateGroup.apply(null, [context, 'max', c, table, ...rest]);
83
+ c.groupMin = (context, ...rest) => aggregateGroup.apply(null, [context, 'min', c, table, false, ...rest]);
84
+ c.groupMax = (context, ...rest) => aggregateGroup.apply(null, [context, 'max', c, table, false, ...rest]);
85
85
  c.groupCount = (context, ...rest) => aggregateGroup.apply(null, [context, 'count', c, table, false, ...rest]);
86
86
  c.sum = (context, ...rest) => aggregate.apply(null, [context, 'sum', c, table, ...rest]);
87
87
  c.avg = (context, ...rest) => aggregate.apply(null, [context, 'avg', c, table, ...rest]);
88
- c.min = (context, ...rest) => aggregate.apply(null, [context, 'min', c, table, ...rest]);
89
- c.max = (context, ...rest) => aggregate.apply(null, [context, 'max', c, table, ...rest]);
88
+ c.min = (context, ...rest) => aggregate.apply(null, [context, 'min', c, table, false, ...rest]);
89
+ c.max = (context, ...rest) => aggregate.apply(null, [context, 'max', c, table, false, ...rest]);
90
90
  c.count = (context, ...rest) => aggregate.apply(null, [context, 'count', c, table, false, ...rest]);
91
91
 
92
92
  function self(context) {
@@ -16,13 +16,13 @@ function newRelatedColumn(column, relations, isShallow, depth) {
16
16
 
17
17
  c.groupSum = (context, ...rest) => aggregateGroup.apply(null, [context, 'sum', column, relations, ...rest]);
18
18
  c.groupAvg = (context, ...rest) => aggregateGroup.apply(null, [context, 'avg', column, relations, ...rest]);
19
- c.groupMin = (context, ...rest) => aggregateGroup.apply(null, [context, 'min', column, relations, ...rest]);
20
- c.groupMax = (context, ...rest) => aggregateGroup.apply(null, [context, 'max', column, relations, ...rest]);
19
+ c.groupMin = (context, ...rest) => aggregateGroup.apply(null, [context, 'min', column, relations, false, ...rest]);
20
+ c.groupMax = (context, ...rest) => aggregateGroup.apply(null, [context, 'max', column, relations, false, ...rest]);
21
21
  c.groupCount = (context, ...rest) => aggregateGroup.apply(null, [context, 'count', column, relations, false, ...rest]);
22
22
  c.sum = (context, ...rest) => aggregate.apply(null, [context, 'sum', column, relations, ...rest]);
23
23
  c.avg = (context, ...rest) => aggregate.apply(null, [context, 'avg', column, relations, ...rest]);
24
- c.min = (context, ...rest) => aggregate.apply(null, [context, 'min', column, relations, ...rest]);
25
- c.max = (context, ...rest) => aggregate.apply(null, [context, 'max', column, relations, ...rest]);
24
+ c.min = (context, ...rest) => aggregate.apply(null, [context, 'min', column, relations, false, ...rest]);
25
+ c.max = (context, ...rest) => aggregate.apply(null, [context, 'max', column, relations, false, ...rest]);
26
26
  c.count = (context, ...rest) => aggregate.apply(null, [context, 'count', column, relations, false, ...rest]);
27
27
  c.self = (context, ...rest) => childColumn.apply(null, [context, column, relations, ...rest]);
28
28
 
@@ -156,8 +156,14 @@ function addParameters(request, params, TYPES) {
156
156
  function toType(p) {
157
157
  if (typeof p === 'string')
158
158
  return TYPES.VarChar;
159
- else if (Number.isInteger(p))
160
- return TYPES.Int;
159
+ else if (Number.isInteger(p)) {
160
+ // Check if the integer is within the 32-bit signed integer range
161
+ if (p >= -2147483648 && p <= 2147483647) {
162
+ return TYPES.Int;
163
+ } else {
164
+ return TYPES.BigInt;
165
+ }
166
+ }
161
167
  else if (typeof p === 'number')
162
168
  return TYPES.Money;
163
169
  else if (p instanceof Date && !isNaN(p))