field_flags.js 923 B

1234567891011121314151617181920
  1. 'use strict';
  2. // Manually extracted from mysql-5.5.23/include/mysql_com.h
  3. exports.NOT_NULL = 1; /* Field can't be NULL */
  4. exports.PRI_KEY = 2; /* Field is part of a primary key */
  5. exports.UNIQUE_KEY = 4; /* Field is part of a unique key */
  6. exports.MULTIPLE_KEY = 8; /* Field is part of a key */
  7. exports.BLOB = 16; /* Field is a blob */
  8. exports.UNSIGNED = 32; /* Field is unsigned */
  9. exports.ZEROFILL = 64; /* Field is zerofill */
  10. exports.BINARY = 128; /* Field is binary */
  11. /* The following are only sent to new clients */
  12. exports.ENUM = 256; /* field is an enum */
  13. exports.AUTO_INCREMENT = 512; /* field is a autoincrement field */
  14. exports.TIMESTAMP = 1024; /* Field is a timestamp */
  15. exports.SET = 2048; /* field is a set */
  16. exports.NO_DEFAULT_VALUE = 4096; /* Field doesn't have default value */
  17. exports.ON_UPDATE_NOW = 8192; /* Field is set to NOW on UPDATE */
  18. exports.NUM = 32768; /* Field is num (for clients) */