Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
basic
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
xrm
basic
Commits
0be700b6
Commit
0be700b6
authored
5 years ago
by
Johannes Hörmann
Browse files
Options
Downloads
Patches
Plain Diff
add warning for big in-statements
parent
ea11370b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
process/Sql_lib/process.js
+4
-1
4 additions, 1 deletion
process/Sql_lib/process.js
with
4 additions
and
1 deletion
process/Sql_lib/process.js
+
4
−
1
View file @
0be700b6
...
...
@@ -2462,6 +2462,10 @@ SqlUtils.getSystemAlias = function()
*/
SqlUtils
.
getSqlInStatement
=
function
(
pFieldname
,
pData
,
pQuoteSymbol
,
pAsPrepared
,
pPreparedDbType
)
{
var
MAX_COUNT
=
1000
;
if
(
pData
.
length
>
1000
)
logging
.
log
(
translate
.
text
(
"
SqlUtils.getSqlInStatement: WARNING: You should not create in-statements with more than 1000 values. As this has a very bad performance.
"
))
if
(
pData
.
length
==
0
)
return
"
1 = 2
"
;
...
...
@@ -2476,7 +2480,6 @@ SqlUtils.getSqlInStatement = function(pFieldname, pData, pQuoteSymbol, pAsPrepar
throw
new
Error
(
translate
.
text
(
"
SqlUtils.getSqlInStatement: if pAsPrepared is true, pPreparedDbType has to be filld with the correct db type
"
));
}
var
MAX_COUNT
=
1000
;
//pData.length -1 um für den Fall, dass MAX_COUNT == pData.length ist trotzdem nur einen Aufruf
//zu machen
var
count
=
((
pData
.
length
-
1
)
/
MAX_COUNT
)
>>
0
;
//aus kommazahl eine ganzzahl machen
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment