public function checkEngine (string $name = 'InnoDB', bool $default = true, bool $exception = true)
		{
			$engines = $this->db->createCommand("SHOW ENGINES")->queryAll();
			foreach ($engines as $engine)
			{
				if (strcasecmp($engine[ 'Engine' ], $name) == 0)
				{
					switch ($engine[ 'Support' ])
					{
						case 'DEFAULT':
							return true;

						case 'YES':
							if ($default)
							{
								if ($exception)
									throw new Exception("Engine $name is enabled but not default.");
								else
									return false;
							}
							else
								return true;

						case 'DISABLED':
							if ($exception)
								throw new Exception("Engine $name is supported but disabled.");
							else
								return false;

						default:
							if ($exception)
								throw new Exception("Engine $name is not supported.");
							else
								return false;
					}
				}
			}

			if ($exception)
				throw new Exception("Engine $name not found in the list of database engines.");
			else
				return false;
		}