diff options
author | David <david@panic.tk> | 2018-11-06 16:16:01 +0100 |
---|---|---|
committer | David <david@panic.tk> | 2018-11-06 16:16:01 +0100 |
commit | 4810dcf339a59f49305e184fc22abf839d41c310 (patch) | |
tree | b45f08b5832a71492f94c43d89a77ec6037908f6 /src/main/java/com/redstoner/misc/mysql/types/text/Set.java | |
parent | 54a6cbf4c86421ddec4852b2d764442f5b1c5b28 (diff) |
Moved files to use the gradle structure
Diffstat (limited to 'src/main/java/com/redstoner/misc/mysql/types/text/Set.java')
-rw-r--r-- | src/main/java/com/redstoner/misc/mysql/types/text/Set.java | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/main/java/com/redstoner/misc/mysql/types/text/Set.java b/src/main/java/com/redstoner/misc/mysql/types/text/Set.java new file mode 100644 index 0000000..4e12ce6 --- /dev/null +++ b/src/main/java/com/redstoner/misc/mysql/types/text/Set.java @@ -0,0 +1,27 @@ +package com.redstoner.misc.mysql.types.text; + +import com.redstoner.misc.mysql.types.MysqlType; + +public class Set extends MysqlType { + private String[] possibleValues; + + public Set(String... possibleValues) { + this.possibleValues = possibleValues; + } + + @Override + public String getName() { + String name = "SET("; + + for (int i = 0; i < possibleValues.length; i++) { + name += "'" + possibleValues[i] + "'"; + + if (i != possibleValues.length - 1) { + name += ","; + } + } + + return name + ")"; + } + +} |