aboutsummaryrefslogtreecommitdiff
path: root/node_modules/mysql2/lib/constants/field_flags.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/mysql2/lib/constants/field_flags.js')
-rw-r--r--node_modules/mysql2/lib/constants/field_flags.js20
1 files changed, 20 insertions, 0 deletions
diff --git a/node_modules/mysql2/lib/constants/field_flags.js b/node_modules/mysql2/lib/constants/field_flags.js
new file mode 100644
index 0000000..184905c
--- /dev/null
+++ b/node_modules/mysql2/lib/constants/field_flags.js
@@ -0,0 +1,20 @@
+'use strict';
+
+// Manually extracted from mysql-5.5.23/include/mysql_com.h
+exports.NOT_NULL = 1; /* Field can't be NULL */
+exports.PRI_KEY = 2; /* Field is part of a primary key */
+exports.UNIQUE_KEY = 4; /* Field is part of a unique key */
+exports.MULTIPLE_KEY = 8; /* Field is part of a key */
+exports.BLOB = 16; /* Field is a blob */
+exports.UNSIGNED = 32; /* Field is unsigned */
+exports.ZEROFILL = 64; /* Field is zerofill */
+exports.BINARY = 128; /* Field is binary */
+
+/* The following are only sent to new clients */
+exports.ENUM = 256; /* field is an enum */
+exports.AUTO_INCREMENT = 512; /* field is a autoincrement field */
+exports.TIMESTAMP = 1024; /* Field is a timestamp */
+exports.SET = 2048; /* field is a set */
+exports.NO_DEFAULT_VALUE = 4096; /* Field doesn't have default value */
+exports.ON_UPDATE_NOW = 8192; /* Field is set to NOW on UPDATE */
+exports.NUM = 32768; /* Field is num (for clients) */