static function insert(\fenrir\system\MysqlDatabaseSignature $db, $table, array $values, $map = null) {
		$map !== null or $map = [];
		isset($map['nums']) or $map['nums'] = [];
		isset($map['bools']) or $map['bools'] = [];
		isset($map['dates']) or $map['dates'] = [];

		$rawkeys = array_keys($values);
		$keys = \hlin\Arr::join(', ', $rawkeys, function ($i, $key) {
			return "`$key`";
		});
		$refs = \hlin\Arr::join(', ', $rawkeys, function ($i, $key) {
			return ":$key";
		});

		$stmt = $db->prepare("INSERT INTO `$table` ($keys) VALUES ($refs)");

		// populate statement
		foreach ($values as $key => $value) {
			if (in_array($key, $map['nums'])) {
				$stmt->num(":$key", $value);
			}
			else if (in_array($key, $map['bools'])) {
				$stmt->bool(":$key", $value);
			}
			else if (in_array($key, $map['dates'])) {
				$stmt->date(":$key", $value);
			}
			else { // assume string
				$stmt->str(":$key", $value);
			}
		}

		$stmt->execute();
		return $db->lastInsertId();
	}