The SYS_TABLES table lists the collections and views of the database and their parameters. It has the following columns:
Column Name |
Data Type |
Description |
|---|---|---|
| TABLE_CATALOG | VARCHAR | The name of the database of the connection. |
| TABLE_SCHEMA | VARCHAR | Not used in dotConnect for MongoDB. Always NULL. |
| TABLE_NAME | VARCHAR | The name of the collection or view. |
| TABLE_TYPE | VARCHAR | "TABLE" for a collection, "VIEW" for a view. |
| CUSTOM | BOOLEAN | Not used in dotConnect for MongoDB. Always False. |
| CAN_QUERY | BOOLEAN | A capability reported by the provider, not a check against the current user's permissions. Always True. |
| ALLOWED_OPERATIONS | INT | Contains flag value that indicates which DML operations are allowed on this table and is the sum of the following flags:
7 for a collection, 0 for a view. |
| API_NAME | VARCHAR | The name of the collection or view in MongoDB. |
| VALIDATION_LEVEL | VARCHAR | The validation level of the schema validator of the collection: "strict", "moderate" or "off". NULL when the collection has no validator. |
| VALIDATION_ACTION | VARCHAR | What MongoDB does with a document that does not match the validator: "error" (rejects it) or "warn" (writes a warning to the server log). NULL when the collection has no validator. |
| VALIDATOR | VARCHAR | The validator of the collection as JSON, for example the $jsonSchema that CREATE TABLE saves. NULL when the collection has no validator. |
| IS_CAPPED | BOOLEAN | Indicates whether the collection is a capped collection. |
Schema Validation is a CREATE TABLE option of dotConnect for MongoDB, not a MongoDB setting name. A collection created with CREATE TABLE ... WITH (Schema Validation = Error) has VALIDATION_LEVEL "strict" and VALIDATION_ACTION "error"; Warn gives "moderate" and "warn"; Off gives "off" and "error".