Skip to content
This repository was archived by the owner on Jun 2, 2025. It is now read-only.

Provide column info #16

Closed
JanJakes opened this issue Feb 12, 2025 · 1 comment
Closed

Provide column info #16

JanJakes opened this issue Feb 12, 2025 · 1 comment

Comments

@JanJakes
Copy link
Contributor

JanJakes commented Feb 12, 2025

WPDB exposes a get_col_info() method that retrieves column metadata from the last query using mysqli_num_fields and mysqli_fetch_field.

PDO statement provides analogous methods columnCount and getColumnMeta, but in the case of the SQLite driver, we may sometimes execute multiple queries for a single MySQL query, so the column info may need to be reconstructed more manually in some cases.

It may also happen that the returned column info needs to be "translated" from SQLite data to MySQL data using the information stored in the information_schema tables.

This also relates to #7 regarding how the column info should be exposed.

@JanJakes
Copy link
Contributor Author

JanJakes commented Jun 2, 2025

@JanJakes JanJakes closed this as completed Jun 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant