Skip to content

[3.0]: Add bool(ean) type to database #8686

@jdarwood007

Description

@jdarwood007

We should support bools in our queries

			$request = Db::$db->query(
				'SELECT *
				FROM {db_prefix}myTable
				WHERE is_enabled = {bool:enabled}',
				[
					'enabled' => true,
				],
			);

The big question comes down to database support. We need to ensure that we either send a 1/0 in case the database type is a tinyint or send it as a real bool.

MySQL seems (at least in 8.0) that PMA sets the boolean as a tinyint(1), however running the query as is_eanbled = true seems to work.

Should we support this for table/column creating/updating?

@albertlast and @Oldiesmann any inputs from PostgreSQL?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions