add dbinfo filter type validation

Description

at the moment, there is no validation of the filter type being passed

rather than check before, do a validation by calling metaData.getTableTypes etc if no rows are returned

also add a tableType alias for the attribute filter

Attachments

1
  • 21 Sept 2023, 03:45 pm

Activity

Show:

Zac Spitzer 21 September 2023 at 15:53
Edited

Pothys - MitrahSoft 21 September 2023 at 15:45

The Lucee documentation lists filter types as [TABLE, VIEW, SYSTEM TABLE, GLOBAL TEMPORARY, LOCAL TEMPORARY, ALIAS, SYNONYM], But it seems to support only [SYSTEM TABLE, TABLE, VIEW] as these filter types.

Pothys - MitrahSoft 21 September 2023 at 13:44

I checked this ticket with Lucee fixed version 6.0.0.557-SNAPSHOT. Now, the dbinfo tag filter attribute throws an error when we set an invalid filter type, and the issue has been resolved.

Zac Spitzer 20 September 2023 at 17:16
Edited

example error from the test cases

[java] [script] Errored: test.tags.dbInfo [java] [script] dbinfo tables, pattern, filter=invalid_table_type_filter [HSQLDB] [java] [script] Invalid [dbinfo] type=table filter [INVALID_TABLE_TYPE_FILTER]. Supported table types are [INDEX, MATERIALIZED VIEW, PARTITIONED INDEX, PARTITIONED TABLE, SEQUENCE, SYSTEM INDEX, SYSTEM TABLE, SYSTEM TOAST INDEX, SYSTEM TOAST TABLE, SYSTEM VIEW, TABLE, TEMPORARY INDEX, TEMPORARY SEQUENCE, TEMPORARY TABLE, TEMPORARY VIEW, TYPE, VIEW]. [java] [script] C:\work\lucee6\test\tags\dbInfo.cfc:160 [java] [script] C:\work\lucee6\test\_testRunner.cfc:275 [java] [script] C:\work\lucee6\test\run-tests.cfm:260

https://github.com/lucee/Lucee/pull/2240

Fixed

Details

Assignee

Reporter

Labels

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Fix versions

Priority

Created 20 September 2023 at 17:04
Updated 22 September 2023 at 05:33
Resolved 22 September 2023 at 05:33

Flag notifications