comparison src/main/java/org/monetdb/mcl/net/Parameter.java @ 868:a227deba0e26

Improve the code, layout, order of variables and setting, and text.
author Martin van Dinther <martin.van.dinther@monetdbsolutions.com>
date Thu, 01 Feb 2024 19:47:20 +0100 (15 months ago)
parents 5a59910e8f87
children e2e7f0d72c95
comparison
equal deleted inserted replaced
867:5a59910e8f87 868:a227deba0e26
38 TIMEZONE("timezone", ParameterType.Int, null, "client time zone as minutes east of UTC", false), 38 TIMEZONE("timezone", ParameterType.Int, null, "client time zone as minutes east of UTC", false),
39 BINARY("binary", ParameterType.Str, "on", "whether to use binary result set format (number or bool)", false), 39 BINARY("binary", ParameterType.Str, "on", "whether to use binary result set format (number or bool)", false),
40 REPLYSIZE("replysize", ParameterType.Int, 250, "rows beyond this limit are retrieved on demand, <1 means unlimited", false), 40 REPLYSIZE("replysize", ParameterType.Int, 250, "rows beyond this limit are retrieved on demand, <1 means unlimited", false),
41 FETCHSIZE("fetchsize", ParameterType.Int, null, "alias for replysize, specific to jdbc", false), 41 FETCHSIZE("fetchsize", ParameterType.Int, null, "alias for replysize, specific to jdbc", false),
42 HASH("hash", ParameterType.Str, "", "specific to jdbc", false), 42 HASH("hash", ParameterType.Str, "", "specific to jdbc", false),
43 DEBUG("debug", ParameterType.Bool, false, "specific to jdbc", false), 43 DEBUG("debug", ParameterType.Bool, false, "enable tracing of socket communication for debugging", false),
44 LOGFILE("logfile", ParameterType.Str, "", "specific to jdbc", false), 44 LOGFILE("logfile", ParameterType.Str, "", "when debug is enabled its output will be written to this logfile", false),
45 SO_TIMEOUT("so_timeout", ParameterType.Int, 0, "abort if network I/O does not complete in this many milliseconds", false), CLOB_AS_VARCHAR("treat_clob_as_varchar", ParameterType.Bool, true, "return CLOB/TEXT data as type VARCHAR instead of type CLOB", false), BLOB_AS_BINARY("treat_blob_as_binary", ParameterType.Bool, true, "return BLOB data as type BINARY instead of type BLOB", false), 45 SO_TIMEOUT("so_timeout", ParameterType.Int, 0, "abort if network I/O does not complete in this many milliseconds, 0 means no timeout", false),
46 CLOB_AS_VARCHAR("treat_clob_as_varchar", ParameterType.Bool, true, "return CLOB/TEXT data as type VARCHAR instead of type CLOB", false),
47 BLOB_AS_BINARY("treat_blob_as_binary", ParameterType.Bool, true, "return BLOB data as type BINARY instead of type BLOB", false),
46 ; 48 ;
47 49
48 public final String name; 50 public final String name;
49 public final ParameterType type; 51 public final ParameterType type;
52 private final Object defaultValue;
50 public final String description; 53 public final String description;
51 public final boolean isCore; 54 public final boolean isCore;
52 private final Object defaultValue;
53 55
54 Parameter(String name, ParameterType type, Object defaultValue, String description, boolean isCore) { 56 Parameter(String name, ParameterType type, Object defaultValue, String description, boolean isCore) {
55 this.name = name; 57 this.name = name;
56 this.type = type; 58 this.type = type;
57 this.isCore = isCore;
58 this.defaultValue = defaultValue; 59 this.defaultValue = defaultValue;
59 this.description = description; 60 this.description = description;
61 this.isCore = isCore;
60 } 62 }
61 63
62 public static Parameter forName(String name) { 64 public static Parameter forName(String name) {
63 switch (name) { 65 switch (name) {
64 case "tls": 66 case "tls":