You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@empire-db.apache.org by de...@apache.org on 2022/03/07 11:59:49 UTC

[empire-db] branch master updated: EMPIREDB-381

This is an automated email from the ASF dual-hosted git repository.

derjan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/empire-db.git


The following commit(s) were added to refs/heads/master by this push:
     new aaae414  EMPIREDB-381
aaae414 is described below

commit aaae4148c8e3c9840ee1ec3e7fb2438f99173c52
Author: Jan Glaubitz <ja...@glaubitz.org>
AuthorDate: Mon Mar 7 12:58:41 2022 +0100

    EMPIREDB-381
    
    - prefix "pg" for postgres functions/operators
---
 .../empire/dbms/postgresql/DBCommandPostgres.java  | 45 +++++++++++++++++-----
 1 file changed, 36 insertions(+), 9 deletions(-)

diff --git a/empire-db/src/main/java/org/apache/empire/dbms/postgresql/DBCommandPostgres.java b/empire-db/src/main/java/org/apache/empire/dbms/postgresql/DBCommandPostgres.java
index d7099b8..a900d89 100644
--- a/empire-db/src/main/java/org/apache/empire/dbms/postgresql/DBCommandPostgres.java
+++ b/empire-db/src/main/java/org/apache/empire/dbms/postgresql/DBCommandPostgres.java
@@ -41,47 +41,74 @@ public class DBCommandPostgres extends DBCommand
         super(autoPrepareStmt);
     }
     
-    public DBColumnExpr funcAge(DBColumnExpr expr)
+    /**
+     * See https://www.postgresql.org/docs/current/functions-datetime.html
+     */
+    public DBColumnExpr pgAge(DBColumnExpr expr)
     {
         return new PostgresFuncExpr(expr, PostgresSqlPhrase.AGE, null, DataType.INTEGER);
     }
     
-    public DBColumnExpr funcAge(DBColumnExpr expr1, DBColumnExpr expr2)
+    /**
+     * See https://www.postgresql.org/docs/current/functions-datetime.html
+     */
+    public DBColumnExpr pgAge(DBColumnExpr expr1, DBColumnExpr expr2)
     {
         return new PostgresFuncExpr(expr1, PostgresSqlPhrase.AGE_BETWEEN, new Object[] { expr2 }, DataType.INTEGER);
     }
     
-    public DBColumnExpr funcExtract(PostgresExtractField field, DBColumnExpr expr)
+    /**
+     * See https://www.postgresql.org/docs/current/functions-datetime.html
+     */
+    public DBColumnExpr pgExtract(PostgresExtractField field, DBColumnExpr expr)
     {
         return new PostgresFuncExpr(expr, PostgresSqlPhrase.EXTRACT, new Object[] { field.name() }, DataType.INTEGER);
     }
     
-    public DBColumnExpr funcToTsquery(DBColumnExpr expr)
+    /**
+     * See https://www.postgresql.org/docs/current/textsearch-controls.html
+     */
+    public DBColumnExpr pgToTsquery(DBColumnExpr expr)
     {
         return new PostgresFuncExpr(expr, PostgresSqlPhrase.TO_TSQUERY, null, DataType.UNKNOWN);
     }
     
-    public DBColumnExpr funcToTsvector(DBColumnExpr expr)
+    /**
+     * See https://www.postgresql.org/docs/current/textsearch-controls.html
+     */
+    public DBColumnExpr pgToTsvector(DBColumnExpr expr)
     {
         return new PostgresFuncExpr(expr, PostgresSqlPhrase.TO_TSVECTOR, null, DataType.UNKNOWN);
     }
     
-    public DBColumnExpr funcPlaintoTsquery(DBColumnExpr expr)
+    /**
+     * See https://www.postgresql.org/docs/current/textsearch-controls.html
+     */
+    public DBColumnExpr pgPlaintoTsquery(DBColumnExpr expr)
     {
         return new PostgresFuncExpr(expr, PostgresSqlPhrase.PLAINTO_TSQUERY, null, DataType.UNKNOWN);
     }
     
-    public DBColumnExpr funcBoolAnd(DBCompareExpr cmpExpr)
+    /**
+     * See https://www.postgresql.org/docs/current/textsearch-controls.html
+     */
+    public DBColumnExpr pgBoolAnd(DBCompareExpr cmpExpr)
     {
         return new PostgresBoolAndOrExpr(cmpExpr, false);
     }
     
-    public DBColumnExpr funcBoolOr(DBCompareExpr cmpExpr)
+    /**
+     * See https://www.postgresql.org/docs/current/textsearch-controls.html
+     */
+    public DBColumnExpr pgBoolOr(DBCompareExpr cmpExpr)
     {
         return new PostgresBoolAndOrExpr(cmpExpr, true);
     }
     
-    public PostgresAtAt compareAtAt(DBColumnExpr left, DBColumnExpr right)
+    /**
+     * See https://www.postgresql.org/docs/current/textsearch-controls.html
+     */
+    public PostgresAtAt pgCompareAtAt(DBColumnExpr left, DBColumnExpr right)
     {
         return new PostgresAtAt(left, right);
     }