]> scripts.mit.edu Git - autoinstallsdev/mediawiki.git/blobdiff - includes/libs/rdbms/field/Field.php
MediaWiki 1.30.2
[autoinstallsdev/mediawiki.git] / includes / libs / rdbms / field / Field.php
diff --git a/includes/libs/rdbms/field/Field.php b/includes/libs/rdbms/field/Field.php
new file mode 100644 (file)
index 0000000..7918f36
--- /dev/null
@@ -0,0 +1,35 @@
+<?php
+
+namespace Wikimedia\Rdbms;
+
+/**
+ * Base for all database-specific classes representing information about database fields
+ * @ingroup Database
+ */
+interface Field {
+       /**
+        * Field name
+        * @return string
+        */
+       function name();
+
+       /**
+        * Name of table this field belongs to
+        * @return string
+        */
+       function tableName();
+
+       /**
+        * Database type
+        * @return string
+        */
+       function type();
+
+       /**
+        * Whether this field can store NULL values
+        * @return bool
+        */
+       function isNullable();
+}
+
+class_alias( Field::class, 'Field' );