Revision 44051
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.impl/src/main/java/org/gvsig/expressionevaluator/impl/DefaultExpressionBuilder.java | ||
---|---|---|
1189 | 1189 |
public BinaryOperator concat(Value op1, Value op2) { |
1190 | 1190 |
return binaryOperator("CONCAT", config.getString(Config.operator_concat), op1, op2); |
1191 | 1191 |
} |
1192 |
|
|
1192 |
|
|
1193 |
@Override |
|
1193 | 1194 |
public Function iif(Value condition, Value iftrue, Value iffalse) { |
1194 | 1195 |
return builtin_function("IIF", config.getString(Config.iif), condition, iftrue, iffalse); |
1195 | 1196 |
} |
1196 | 1197 |
|
1198 |
@Override |
|
1197 | 1199 |
public Function ifnull(Value value, Value iftrue, Value iffalse) { |
1198 | 1200 |
return builtin_function("IFNULL", config.getString(Config.ifnull), value, iftrue, iffalse); |
1199 | 1201 |
} |
1202 |
|
|
1203 |
@Override |
|
1204 |
public Function left(Value str, Value size) { |
|
1205 |
return function("left", str, size); |
|
1206 |
// return builtin_function("left", "left({1})",str,size); |
|
1207 |
} |
|
1208 |
|
|
1209 |
@Override |
|
1210 |
public Function right(Value str, Value len) { |
|
1211 |
return function("right", str, len); |
|
1212 |
} |
|
1213 |
|
|
1214 |
@Override |
|
1215 |
public Function locate(Value search, Value str, Value start) { |
|
1216 |
return function("locate", search, str, start); |
|
1217 |
} |
|
1218 |
|
|
1219 |
@Override |
|
1220 |
public Function position(Value search, Value str) { |
|
1221 |
return function("position", search, str); |
|
1222 |
} |
|
1223 |
|
|
1224 |
@Override |
|
1225 |
public Function lpad(Value str, Value len, Value padstr) { |
|
1226 |
return function("lpad", str, len, padstr); |
|
1227 |
} |
|
1228 |
|
|
1229 |
@Override |
|
1230 |
public Function rpad(Value str, Value len, Value padstr) { |
|
1231 |
return function("rpad", str, len, padstr); |
|
1232 |
} |
|
1233 |
|
|
1234 |
@Override |
|
1235 |
public Function ltrim(Value str) { |
|
1236 |
return function("ltrim", str); |
|
1237 |
} |
|
1238 |
|
|
1239 |
@Override |
|
1240 |
public Function rtrim(Value str) { |
|
1241 |
return function("rtrim", str); |
|
1242 |
} |
|
1243 |
|
|
1244 |
@Override |
|
1245 |
public Function trim(Value str) { |
|
1246 |
return function("trim", str); |
|
1247 |
} |
|
1248 |
|
|
1249 |
@Override |
|
1250 |
public Function repeat(Value str, Value size) { |
|
1251 |
return function("repeat", str, size); |
|
1252 |
} |
|
1253 |
|
|
1254 |
@Override |
|
1255 |
public Function replace(Value str, Value search, Value replstr) { |
|
1256 |
return function("replace", str, search, replstr); |
|
1257 |
} |
|
1258 |
|
|
1259 |
@Override |
|
1260 |
public Function ascii(Value str) { |
|
1261 |
return function("ascii", str); |
|
1262 |
} |
|
1263 |
|
|
1264 |
@Override |
|
1265 |
public Function lenght(Value str) { |
|
1266 |
return function("lenght", str); |
|
1267 |
} |
|
1268 |
|
|
1269 |
@Override |
|
1270 |
public Function instr(Value str, Value search, Value start) { |
|
1271 |
return function("instr", str, search, start); |
|
1272 |
} |
|
1273 |
|
|
1274 |
@Override |
|
1275 |
public Function lower(Value str) { |
|
1276 |
return function("lower", str); |
|
1277 |
} |
|
1278 |
|
|
1279 |
@Override |
|
1280 |
public Function upper(Value str) { |
|
1281 |
return function("upper", str); |
|
1282 |
} |
|
1283 |
|
|
1284 |
@Override |
|
1285 |
public Function space(Value size) { |
|
1286 |
return function("space", size); |
|
1287 |
} |
|
1288 |
|
|
1289 |
@Override |
|
1290 |
public Function substring(Value str, Value start, Value len) { |
|
1291 |
return function("substring", str, start, len); |
|
1292 |
} |
|
1293 |
|
|
1294 |
@Override |
|
1295 |
public Function acos(Value num) { |
|
1296 |
return function("acos", num); |
|
1297 |
} |
|
1298 |
|
|
1299 |
@Override |
|
1300 |
public Function asin(Value num) { |
|
1301 |
return function("asin", num); |
|
1302 |
} |
|
1303 |
|
|
1304 |
@Override |
|
1305 |
public Function atan(Value num) { |
|
1306 |
return function("atan", num); |
|
1307 |
} |
|
1308 |
|
|
1309 |
@Override |
|
1310 |
public Function cos(Value num) { |
|
1311 |
return function("cos", num); |
|
1312 |
} |
|
1313 |
|
|
1314 |
@Override |
|
1315 |
public Function cosh(Value num) { |
|
1316 |
return function("cosh", num); |
|
1317 |
} |
|
1318 |
|
|
1319 |
@Override |
|
1320 |
public Function cot(Value num) { |
|
1321 |
return function("cot", num); |
|
1322 |
} |
|
1323 |
|
|
1324 |
@Override |
|
1325 |
public Function bitand(Value num1, Value num2) { |
|
1326 |
return function("bitand", num1, num2); |
|
1327 |
} |
|
1328 |
|
|
1329 |
@Override |
|
1330 |
public Function bitor(Value num1, Value num2) { |
|
1331 |
return function("bitor", num1, num2); |
|
1332 |
} |
|
1333 |
|
|
1334 |
@Override |
|
1335 |
public Function bitxor(Value num1, Value num2) { |
|
1336 |
return function("bitxor", num1, num2); |
|
1337 |
} |
|
1338 |
|
|
1339 |
@Override |
|
1340 |
public Function ceil(Value num) { |
|
1341 |
return function("ceil", num); |
|
1342 |
} |
|
1343 |
|
|
1344 |
@Override |
|
1345 |
public Function degrees(Value num) { |
|
1346 |
return function("degrees", num); |
|
1347 |
} |
|
1348 |
|
|
1349 |
@Override |
|
1350 |
public Function exp(Value num) { |
|
1351 |
return function("exp", num); |
|
1352 |
} |
|
1353 |
|
|
1354 |
@Override |
|
1355 |
public Function floor(Value num) { |
|
1356 |
return function("floor", num); |
|
1357 |
} |
|
1358 |
|
|
1359 |
@Override |
|
1360 |
public Function log(Value num) { |
|
1361 |
return function("log", num); |
|
1362 |
} |
|
1363 |
|
|
1364 |
@Override |
|
1365 |
public Function log10(Value num) { |
|
1366 |
return function("log10", num); |
|
1367 |
} |
|
1368 |
|
|
1369 |
@Override |
|
1370 |
public Function pi(Value num) { |
|
1371 |
return function("pi", num); |
|
1372 |
} |
|
1373 |
|
|
1374 |
@Override |
|
1375 |
public Function power(Value num) { |
|
1376 |
return function("power", num); |
|
1377 |
} |
|
1378 |
|
|
1379 |
@Override |
|
1380 |
public Function radians(Value num) { |
|
1381 |
return function("radians", num); |
|
1382 |
} |
|
1383 |
|
|
1384 |
@Override |
|
1385 |
public Function rand(Value num) { |
|
1386 |
return function("rand", num); |
|
1387 |
} |
|
1388 |
|
|
1389 |
@Override |
|
1390 |
public Function round(Value num) { |
|
1391 |
return function("round", num); |
|
1392 |
} |
|
1393 |
|
|
1394 |
@Override |
|
1395 |
public Function sqrt(Value num) { |
|
1396 |
return function("sqrt", num); |
|
1397 |
} |
|
1398 |
|
|
1399 |
@Override |
|
1400 |
public Function sign(Value num) { |
|
1401 |
return function("sign", num); |
|
1402 |
} |
|
1403 |
|
|
1404 |
@Override |
|
1405 |
public Function sin(Value num) { |
|
1406 |
return function("sin", num); |
|
1407 |
} |
|
1408 |
|
|
1409 |
@Override |
|
1410 |
public Function sinh(Value num) { |
|
1411 |
return function("sinh", num); |
|
1412 |
} |
|
1413 |
|
|
1414 |
@Override |
|
1415 |
public Function tan(Value num) { |
|
1416 |
return function("tan", num); |
|
1417 |
} |
|
1418 |
@Override |
|
1419 |
public Function tanh(Value num) { |
|
1420 |
return function("cosh", num); |
|
1421 |
} |
|
1422 |
|
|
1423 |
@Override |
|
1424 |
public Function zero() { |
|
1425 |
return function("zero"); |
|
1426 |
} |
|
1427 |
|
|
1200 | 1428 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.library/org.gvsig.expressionevaluator/org.gvsig.expressionevaluator.lib/org.gvsig.expressionevaluator.lib.api/src/main/java/org/gvsig/expressionevaluator/ExpressionBuilder.java | ||
---|---|---|
308 | 308 |
public Function ifnull(Value value, Value iftrue, Value iffalse); |
309 | 309 |
|
310 | 310 |
public ExpressionBuilder createExpressionBuilder(); |
311 |
|
|
312 |
public Function left(Value str, Value size); |
|
313 |
|
|
314 |
public Function right(Value str, Value len); |
|
315 |
|
|
316 |
public Function locate(Value search, Value str, Value start) ; |
|
317 |
|
|
318 |
public Function position(Value search, Value str); |
|
319 |
|
|
320 |
public Function lpad(Value str, Value len, Value padstr) ; |
|
321 |
|
|
322 |
public Function rpad(Value str, Value len, Value padstr); |
|
323 |
|
|
324 |
public Function ltrim(Value str); |
|
325 |
|
|
326 |
public Function rtrim(Value str); |
|
327 |
|
|
328 |
public Function trim(Value str); |
|
329 |
|
|
330 |
public Function repeat(Value str, Value size); |
|
331 |
|
|
332 |
public Function replace(Value str, Value search, Value replstr); |
|
333 |
|
|
334 |
public Function ascii(Value str); |
|
335 |
|
|
336 |
public Function lenght(Value str); |
|
337 |
|
|
338 |
public Function instr(Value str, Value search, Value start); |
|
339 |
|
|
340 |
public Function lower(Value str); |
|
341 |
|
|
342 |
public Function upper(Value str); |
|
343 |
|
|
344 |
public Function space(Value size); |
|
345 |
|
|
346 |
public Function substring(Value str, Value start, Value len); |
|
347 |
|
|
348 |
public Function acos(Value num); |
|
349 |
|
|
350 |
public Function asin(Value num); |
|
351 |
|
|
352 |
public Function atan(Value num); |
|
353 |
|
|
354 |
public Function cos(Value num); |
|
355 |
|
|
356 |
public Function cosh(Value num); |
|
357 |
|
|
358 |
public Function cot(Value num); |
|
359 |
|
|
360 |
public Function bitand(Value num1, Value num2); |
|
361 |
|
|
362 |
public Function bitor(Value num1, Value num2); |
|
363 |
|
|
364 |
public Function bitxor(Value num1, Value num2); |
|
365 |
|
|
366 |
public Function ceil(Value num); |
|
367 |
|
|
368 |
public Function degrees(Value num); |
|
369 |
|
|
370 |
public Function exp(Value num); |
|
371 |
|
|
372 |
public Function floor(Value num); |
|
373 |
|
|
374 |
public Function log(Value num); |
|
375 |
|
|
376 |
public Function log10(Value num); |
|
377 |
|
|
378 |
public Function pi(Value num); |
|
379 |
|
|
380 |
public Function power(Value num); |
|
381 |
|
|
382 |
public Function radians(Value num); |
|
383 |
|
|
384 |
public Function rand(Value num); |
|
385 |
|
|
386 |
public Function round(Value num); |
|
387 |
|
|
388 |
public Function sqrt(Value num); |
|
389 |
|
|
390 |
public Function sign(Value num); |
|
391 |
|
|
392 |
public Function sin(Value num); |
|
393 |
|
|
394 |
public Function sinh(Value num); |
|
395 |
|
|
396 |
public Function tan(Value num); |
|
397 |
|
|
398 |
public Function tanh(Value num); |
|
399 |
|
|
400 |
public Function zero(); |
|
311 | 401 |
} |
trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.dal/org.gvsig.fmap.dal.spi/src/main/java/org/gvsig/fmap/dal/feature/spi/SQLBuilderBase.java | ||
---|---|---|
3552 | 3552 |
public Function ifnull(Value value, Value iftrue, Value iffalse) { |
3553 | 3553 |
return builtin_function("IFNULL", config.getString(Config.ifnull), value, iftrue, iffalse); |
3554 | 3554 |
} |
3555 |
|
|
3556 |
|
|
3557 |
@Override |
|
3558 |
public Function left(Value str, Value size) { |
|
3559 |
return function("left", str, size); |
|
3560 |
// return builtin_function("left", "left({1})",str,size); |
|
3561 |
} |
|
3562 |
|
|
3563 |
@Override |
|
3564 |
public Function right(Value str, Value len) { |
|
3565 |
return function("right", str, len); |
|
3566 |
} |
|
3567 |
|
|
3568 |
@Override |
|
3569 |
public Function locate(Value search, Value str, Value start) { |
|
3570 |
return function("locate", search, str, start); |
|
3571 |
} |
|
3572 |
|
|
3573 |
@Override |
|
3574 |
public Function position(Value search, Value str) { |
|
3575 |
return function("position", search, str); |
|
3576 |
} |
|
3577 |
|
|
3578 |
@Override |
|
3579 |
public Function lpad(Value str, Value len, Value padstr) { |
|
3580 |
return function("lpad", str, len, padstr); |
|
3581 |
} |
|
3582 |
|
|
3583 |
@Override |
|
3584 |
public Function rpad(Value str, Value len, Value padstr) { |
|
3585 |
return function("rpad", str, len, padstr); |
|
3586 |
} |
|
3587 |
|
|
3588 |
@Override |
|
3589 |
public Function ltrim(Value str) { |
|
3590 |
return function("ltrim", str); |
|
3591 |
} |
|
3592 |
|
|
3593 |
@Override |
|
3594 |
public Function rtrim(Value str) { |
|
3595 |
return function("rtrim", str); |
|
3596 |
} |
|
3597 |
|
|
3598 |
@Override |
|
3599 |
public Function trim(Value str) { |
|
3600 |
return function("trim", str); |
|
3601 |
} |
|
3602 |
|
|
3603 |
@Override |
|
3604 |
public Function repeat(Value str, Value size) { |
|
3605 |
return function("repeat", str, size); |
|
3606 |
} |
|
3607 |
|
|
3608 |
@Override |
|
3609 |
public Function replace(Value str, Value search, Value replstr) { |
|
3610 |
return function("replace", str, search, replstr); |
|
3611 |
} |
|
3612 |
|
|
3613 |
@Override |
|
3614 |
public Function ascii(Value str) { |
|
3615 |
return function("ascii", str); |
|
3616 |
} |
|
3617 |
|
|
3618 |
@Override |
|
3619 |
public Function lenght(Value str) { |
|
3620 |
return function("lenght", str); |
|
3621 |
} |
|
3555 | 3622 |
|
3623 |
@Override |
|
3624 |
public Function instr(Value str, Value search, Value start) { |
|
3625 |
return function("instr", str, search, start); |
|
3626 |
} |
|
3627 |
|
|
3628 |
@Override |
|
3629 |
public Function lower(Value str) { |
|
3630 |
return function("lower", str); |
|
3631 |
} |
|
3632 |
|
|
3633 |
@Override |
|
3634 |
public Function upper(Value str) { |
|
3635 |
return function("upper", str); |
|
3636 |
} |
|
3637 |
|
|
3638 |
@Override |
|
3639 |
public Function space(Value size) { |
|
3640 |
return function("space", size); |
|
3641 |
} |
|
3642 |
|
|
3643 |
@Override |
|
3644 |
public Function substring(Value str, Value start, Value len) { |
|
3645 |
return function("substring", str, start, len); |
|
3646 |
} |
|
3647 |
|
|
3648 |
@Override |
|
3649 |
public Function acos(Value num) { |
|
3650 |
return function("acos", num); |
|
3651 |
} |
|
3652 |
|
|
3653 |
@Override |
|
3654 |
public Function asin(Value num) { |
|
3655 |
return function("asin", num); |
|
3656 |
} |
|
3657 |
|
|
3658 |
@Override |
|
3659 |
public Function atan(Value num) { |
|
3660 |
return function("atan", num); |
|
3661 |
} |
|
3662 |
|
|
3663 |
@Override |
|
3664 |
public Function cos(Value num) { |
|
3665 |
return function("cos", num); |
|
3666 |
} |
|
3667 |
|
|
3668 |
@Override |
|
3669 |
public Function cosh(Value num) { |
|
3670 |
return function("cosh", num); |
|
3671 |
} |
|
3672 |
|
|
3673 |
@Override |
|
3674 |
public Function cot(Value num) { |
|
3675 |
return function("cot", num); |
|
3676 |
} |
|
3677 |
|
|
3678 |
@Override |
|
3679 |
public Function bitand(Value num1, Value num2) { |
|
3680 |
return function("bitand", num1, num2); |
|
3681 |
} |
|
3682 |
|
|
3683 |
@Override |
|
3684 |
public Function bitor(Value num1, Value num2) { |
|
3685 |
return function("bitor", num1, num2); |
|
3686 |
} |
|
3687 |
|
|
3688 |
@Override |
|
3689 |
public Function bitxor(Value num1, Value num2) { |
|
3690 |
return function("bitxor", num1, num2); |
|
3691 |
} |
|
3692 |
|
|
3693 |
@Override |
|
3694 |
public Function ceil(Value num) { |
|
3695 |
return function("ceil", num); |
|
3696 |
} |
|
3697 |
|
|
3698 |
@Override |
|
3699 |
public Function degrees(Value num) { |
|
3700 |
return function("degrees", num); |
|
3701 |
} |
|
3702 |
|
|
3703 |
@Override |
|
3704 |
public Function exp(Value num) { |
|
3705 |
return function("exp", num); |
|
3706 |
} |
|
3707 |
|
|
3708 |
@Override |
|
3709 |
public Function floor(Value num) { |
|
3710 |
return function("floor", num); |
|
3711 |
} |
|
3712 |
|
|
3713 |
@Override |
|
3714 |
public Function log(Value num) { |
|
3715 |
return function("log", num); |
|
3716 |
} |
|
3717 |
|
|
3718 |
@Override |
|
3719 |
public Function log10(Value num) { |
|
3720 |
return function("log10", num); |
|
3721 |
} |
|
3722 |
|
|
3723 |
@Override |
|
3724 |
public Function pi(Value num) { |
|
3725 |
return function("pi", num); |
|
3726 |
} |
|
3727 |
|
|
3728 |
@Override |
|
3729 |
public Function power(Value num) { |
|
3730 |
return function("power", num); |
|
3731 |
} |
|
3732 |
|
|
3733 |
@Override |
|
3734 |
public Function radians(Value num) { |
|
3735 |
return function("radians", num); |
|
3736 |
} |
|
3737 |
|
|
3738 |
@Override |
|
3739 |
public Function rand(Value num) { |
|
3740 |
return function("rand", num); |
|
3741 |
} |
|
3742 |
|
|
3743 |
@Override |
|
3744 |
public Function round(Value num) { |
|
3745 |
return function("round", num); |
|
3746 |
} |
|
3747 |
|
|
3748 |
@Override |
|
3749 |
public Function sqrt(Value num) { |
|
3750 |
return function("sqrt", num); |
|
3751 |
} |
|
3752 |
|
|
3753 |
@Override |
|
3754 |
public Function sign(Value num) { |
|
3755 |
return function("sign", num); |
|
3756 |
} |
|
3757 |
|
|
3758 |
@Override |
|
3759 |
public Function sin(Value num) { |
|
3760 |
return function("sin", num); |
|
3761 |
} |
|
3762 |
|
|
3763 |
@Override |
|
3764 |
public Function sinh(Value num) { |
|
3765 |
return function("sinh", num); |
|
3766 |
} |
|
3767 |
|
|
3768 |
@Override |
|
3769 |
public Function tan(Value num) { |
|
3770 |
return function("tan", num); |
|
3771 |
} |
|
3772 |
@Override |
|
3773 |
public Function tanh(Value num) { |
|
3774 |
return function("cosh", num); |
|
3775 |
} |
|
3776 |
|
|
3777 |
@Override |
|
3778 |
public Function zero() { |
|
3779 |
return function("zero"); |
|
3780 |
} |
|
3556 | 3781 |
} |
Also available in: Unified diff