ruanwenjun commented on code in PR #5564:
URL: https://github.com/apache/seatunnel/pull/5564#discussion_r1338758293


##########
docs/en/concept/schema-feature.md:
##########
@@ -26,9 +72,111 @@ Some NoSQL databases or message queue are not strongly 
limited schema, so the sc
 | map       | `java.util.Map`                                    | A Map is an 
object that maps keys to values. The key type includes `int` `string` `boolean` 
`tinyint` `smallint` `bigint` `float` `double` `decimal` `date` `time` 
`timestamp` `null` , and the value type includes `int` `string` `boolean` 
`tinyint` `smallint` `bigint` `float` `double` `decimal` `date` `time` 
`timestamp` `null` `array` `map`. |
 | array     | `ValueType[]`                                      | A array is 
a data type that represents a collection of elements. The element type includes 
`int` `string` `boolean` `tinyint` `smallint` `bigint` `float` `double` `array` 
`map`.                                                                          
                                                                                
           |
 
+### PrimaryKey
+
+Primary key is a config used to define the primary key in schema, it contains 
name, columns field.
+
+```
+primaryKey {
+    name = id
+    columns = [id]
+}
+```
+
+| Field   | Required | Default Value |            Description            |
+|:--------|:---------|:--------------|-----------------------------------|
+| name    | Yes      | -             | The name of the primaryKey        |
+| columns | Yes      | -             | The column list in the primaryKey |
+
+### ConstraintKeys
+
+Constraint keys is a list of config used to define the constraint keys in 
schema, it contains constraintName, constraintType, constraintColumns field.
+
+```
+constraintKeys = [
+      {
+         constraintName = "id_index"
+         constraintType = KEY
+         constraintColumns = [
+            {
+                columnName = "id"
+                sortType = ASC
+            }
+         ]
+      },
+   ]
+```
+
+| Field             | Required | Default Value |                               
                                 Description                                    
                            |
+|:------------------|:---------|:--------------|-------------------------------------------------------------------------------------------------------------------------------------------|
+| constraintName    | Yes      | -             | The name of the constraintKey 
                                                                                
                            |
+| constraintType    | No       | KEY           | The type of the constraintKey 
                                                                                
                            |
+| constraintColumns | Yes      | -             | The column list in the 
primaryKey, each column should contains constraintType and sortType, sortType 
support ASC and DESC, default is ASC |
+
+#### What constraintType supported at now
+
+| ConstraintType | Description |
+|:---------------|:------------|
+| KEY            | key         |
+| UNIQUE_KEY     | unique key  |
+| FOREIGN_KEY    | foreign key |

Review Comment:
   In fact, we don't support foreign keys!



-- 
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: commits-unsubscr...@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to