quantranhong1999 commented on code in PR #1849:
URL: https://github.com/apache/james-project/pull/1849#discussion_r1422383129


##########
server/data/data-postgres/src/main/java/org/apache/james/sieve/postgres/PostgresSieveModule.java:
##########
@@ -0,0 +1,58 @@
+/****************************************************************
+ * Licensed to the Apache Software Foundation (ASF) under one   *
+ * or more contributor license agreements.  See the NOTICE file *
+ * distributed with this work for additional information        *
+ * regarding copyright ownership.  The ASF licenses this file   *
+ * to you under the Apache License, Version 2.0 (the            *
+ * "License"); you may not use this file except in compliance   *
+ * with the License.  You may obtain a copy of the License at   *
+ *                                                              *
+ *   http://www.apache.org/licenses/LICENSE-2.0                 *
+ *                                                              *
+ * Unless required by applicable law or agreed to in writing,   *
+ * software distributed under the License is distributed on an  *
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
+ * KIND, either express or implied.  See the License for the    *
+ * specific language governing permissions and limitations      *
+ * under the License.                                           *
+ ****************************************************************/
+
+package org.apache.james.sieve.postgres;
+
+import java.time.OffsetDateTime;
+
+import org.apache.james.backends.postgres.PostgresModule;
+import org.apache.james.backends.postgres.PostgresTable;
+import org.jooq.Field;
+import org.jooq.Record;
+import org.jooq.Table;
+import org.jooq.impl.DSL;
+import org.jooq.impl.SQLDataType;
+
+public interface PostgresSieveModule {
+    interface PostgresSieveScriptTable {
+        Table<Record> TABLE_NAME = DSL.table("sieve_scripts");
+
+        Field<String> USERNAME = DSL.field("username", 
SQLDataType.VARCHAR(255).notNull());
+        Field<String> SCRIPT_NAME = DSL.field("script_name", 
SQLDataType.VARCHAR.notNull());

Review Comment:
   There is no `TEXT` data type in jooq.
   
   This declares the `VARCHAR` data type in Postgres, which basically likes 
`TEXT`.
   
   `If you do not specify the n integer for the VARCHAR data type, it behaves 
like the TEXT datatype. The performance of the VARCHAR (without the size n) and 
TEXT are the same.`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to