implementazione query, progress
This commit is contained in:
parent
52b7d50416
commit
114720b7e8
|
|
@ -677,6 +677,8 @@ function getFiltroContestoJson(datiContesto) {
|
||||||
return []
|
return []
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//CLAUSE BUILDER
|
||||||
|
|
||||||
function buildStatementClause(clause, parsedquery, whereind, theplace, token, op) {
|
function buildStatementClause(clause, parsedquery, whereind, theplace, token, op) {
|
||||||
//
|
//
|
||||||
var tmpgroup = ''
|
var tmpgroup = ''
|
||||||
|
|
@ -756,7 +758,12 @@ function buildStatementClause(clause, parsedquery, whereind, theplace, token, op
|
||||||
tmpg = tmpg.replaceAll('"pos"', '"pos' + token + '"')
|
tmpg = tmpg.replaceAll('"pos"', '"pos' + token + '"')
|
||||||
tmpg = tmpg.replaceAll('"lm"', '"lm' + token + '"')
|
tmpg = tmpg.replaceAll('"lm"', '"lm' + token + '"')
|
||||||
tmpg = tmpg.replaceAll('"reg"', '"reg' + token + '"')
|
tmpg = tmpg.replaceAll('"reg"', '"reg' + token + '"')
|
||||||
|
|
||||||
|
if (op=='OR')
|
||||||
tmpg = tmpg.replaceAll('"clg"', '"clg' + token + '"')
|
tmpg = tmpg.replaceAll('"clg"', '"clg' + token + '"')
|
||||||
|
else
|
||||||
|
tmpg = tmpg.replaceAll('"clg"', '"cl"')
|
||||||
|
|
||||||
tmpg = tmpg.replaceAll('"cloccte"', '"cloccte' + token + '"')
|
tmpg = tmpg.replaceAll('"cloccte"', '"cloccte' + token + '"')
|
||||||
var tmppos = `{
|
var tmppos = `{
|
||||||
"type": "operation",
|
"type": "operation",
|
||||||
|
|
@ -823,13 +830,14 @@ function buildStatementClause(clause, parsedquery, whereind, theplace, token, op
|
||||||
}
|
}
|
||||||
var functS = clause['functionSyntax'];
|
var functS = clause['functionSyntax'];
|
||||||
var typeS = clause['typeSyntax0']
|
var typeS = clause['typeSyntax0']
|
||||||
console.log(functS + ' ' + typeS)
|
|
||||||
var myf = ''
|
var myf = ''
|
||||||
if (functS != null && functS != ".+" && functS != "all") {
|
if (functS != null && functS != ".+" && functS != "all") {
|
||||||
myf = buildsyntClause(funzione_clausola[functS])
|
myf = buildsyntClause(funzione_clausola[functS])
|
||||||
if (myf != '')
|
if (myf != '')
|
||||||
tmpgroup.patterns.at(-1).triples.push(myf)
|
tmpgroup.patterns.at(-1).triples.push(myf)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typeS != null && typeS != ".+" && typeS != "all") {
|
if (typeS != null && typeS != ".+" && typeS != "all") {
|
||||||
var alltipi = Object.assign(macrotipi_sint, tipi_sint);
|
var alltipi = Object.assign(macrotipi_sint, tipi_sint);
|
||||||
let mymt = alltipi[typeS]
|
let mymt = alltipi[typeS]
|
||||||
|
|
@ -854,7 +862,8 @@ function buildStatementClause(clause, parsedquery, whereind, theplace, token, op
|
||||||
}
|
}
|
||||||
if (theguiQ['unitaRicerca'] == 'periodo' || theguiQ['unitaRicerca'] == 'frase' || theguiQ['unitaRicerca'] == 'verso') {
|
if (theguiQ['unitaRicerca'] == 'periodo' || theguiQ['unitaRicerca'] == 'frase' || theguiQ['unitaRicerca'] == 'verso') {
|
||||||
mytest = JSON.stringify(tmpgroup)
|
mytest = JSON.stringify(tmpgroup)
|
||||||
mytest = mytest.replaceAll(':"cl"', ':"cl' + token + '"')
|
if (op=='OR')
|
||||||
|
mytest = tmpg.replaceAll(':"cl"', ':"cl' + token + '"')
|
||||||
mytest = mytest.replaceAll(':"clatype"', ':"clatype' + token + '"')
|
mytest = mytest.replaceAll(':"clatype"', ':"clatype' + token + '"')
|
||||||
mytest = mytest.replaceAll(':"clafunction"', ':"clafunction' + token + '"')
|
mytest = mytest.replaceAll(':"clafunction"', ':"clafunction' + token + '"')
|
||||||
mytest = mytest.replaceAll(':"cloccu"', ':"cloccu' + token + '"')
|
mytest = mytest.replaceAll(':"cloccu"', ':"cloccu' + token + '"')
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue