-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release/2.1.0 - WIP #119
base: master
Are you sure you want to change the base?
Release/2.1.0 - WIP #119
Commits on Aug 31, 2021
-
PR/115 - Recommendations from phpstan. (#118)
* Fix return types in Query * Docs: improvents recommended by phpstan-wordpress. Props szepeviktor. Co-authored-by: Viktor Szépe <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 5a4adb2 - Browse repository at this point
Copy the full SHA 5a4adb2View commit details -
Configuration menu - View commit details
-
Copy full SHA for aeb83f6 - Browse repository at this point
Copy the full SHA aeb83f6View commit details -
Configuration menu - View commit details
-
Copy full SHA for d5fd271 - Browse repository at this point
Copy the full SHA d5fd271View commit details -
Configuration menu - View commit details
-
Copy full SHA for 793ad1c - Browse repository at this point
Copy the full SHA 793ad1cView commit details
Commits on Sep 8, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 674764d - Browse repository at this point
Copy the full SHA 674764dView commit details
Commits on Sep 9, 2021
-
Query: change the parameter order of private method transition_item()
This change ensures that, going forward, this methods parameter signature better matches the other _item() methods. This should be /relatively/ safe to do thanks to it being private. I've looked at all of the projects I'm aware of that use Berlin, and they are all uneffected.
Configuration menu - View commit details
-
Copy full SHA for 5a1375d - Browse repository at this point
Copy the full SHA 5a1375dView commit details
Commits on Apr 29, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 15f8a3a - Browse repository at this point
Copy the full SHA 15f8a3aView commit details -
Configuration menu - View commit details
-
Copy full SHA for ec5452a - Browse repository at this point
Copy the full SHA ec5452aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3be9949 - Browse repository at this point
Copy the full SHA 3be9949View commit details
Commits on May 26, 2022
-
Table: add support for table comment.
This refactors the Table::create() SQL generator to explode an array of parts, which should make it easier to make more edits to later.
Configuration menu - View commit details
-
Copy full SHA for 5670fb5 - Browse repository at this point
Copy the full SHA 5670fb5View commit details
Commits on Jun 27, 2022
-
* Column: improvements to $pattern * Always a string (no false) * Add link to PHP docs * Update description to remove "string replace" * Set UUID to %s * Base: prevent double prefixing in apply_prefix() * Column: correct inline doc * Column: rename private references from pattern to format. * Autoloader: minor code cleanup * Column: various improvements: * Tons of inline & block docs * Smarter default class values * Column::args are saved during parse_args() for later reuse * Prefer get_object_vars() over another array of args * Add "extra" support to special_args() * Add is_ methods for some other types * Add is_extra() method for comparing extra values * Add sanitize_extra() for allowing specific values * Improve fallback support in sanitize_pattern() * Improve fallback support in sanitize_validation() * Remove function_exists check for gmdate() from validate_datetime() * Legitimize validate_numeric() and use where appropriate * Improve get_create_string() with support for binary, more types, null, etc... * Base: introduce sanitize_column_name() * Allows upper-case letters in table and column names. * Swaps out sanitize_key() usage for a custom preg_replace: '/^[a-zA-Z0-9_\-]+$/' * Table: use Base::sanitize_column_name() * Also fix return value inline comment in count() * Column: introduce validate() and validate_int() * validate() centralizes column value validation into the most logical location, and validate_int() allows for falling back to $default in a way that intval obviously could not. * Base: update regex. * Base: add stash_args() method * Also avoid errors in apply_prefix() if not a string. * Column: use stash_args() * Also bail early if no arguments to parse. * Schema: add support for indexes. * Move filters into methods and their own section * Improve docs, and add missing docs * Default values for item_names to prevent fatals * Add setup() method and move set_ methods out of __construct() and into it * Minimize touches to this->columns for future Schema/Structure work * Remove assumptions that primary column must be an int that uses absint/intval - see #124 * Add some todo's for MySQL 8 improvements * Improve support for CURRENT_TIMESTAMP in relevant columns * Add get_columns_field_by() to retrieve a single field from a matching array of values to a single key - primarily used for getting an array of column patterns when querying, to return an array of formats for sprintf() * Improve readability of do_action_ref_array() calls * Clean-up get_item_ids() * Rename parse_where() to parse_query_vars() * Add parse_where() and parse_join() – likely get renamed in the future * Use wp_parse_list() instead of wp_parse_id_list() - likely needs its own handler * Prevent fatals from return values of get_search_sql() * Abstract repeated code into new get_in_sql() method to escape/prepare/format IN (%s) SQL * Introduce parse_query_var() and use it in place of repeated query_vars[] touches - attempts to internally parse comma separated strings (might remove) * Introduce undocumented $column->by check to allow a column to not be queried directly by its name * Refactor parse_query_vars() to improve its internal patterns, for future abstraction * Fallback in parse_fields() and parse_groupby() to prevent fatal errors * Introduce parse_single_orderby, parse_limits, parse_join, and parse_where - refactor parse_orderby * Some minor clean-up to shape_items() * Bail early in get_item_fields() to avoid trying to filter empty fields * Introduce validate_item_field() to call $column->validate(), and use it inside shape_item_id() and more. This centralizes validation and ensures they always return the same results. * Update add_item() and update_item() to skip database if $save fails validation * Update copy_item() to shape the item ID, as it is not done inside of get_item_raw() * Update delete_item() to match other item changes above * All _item() functions use get_columns_field_by() to get patterns to send into wpdb queries for proper formatting (including delete_all_item_meta) - see #137 * Update validate_item() to use validate_item_field() * Use shape_item_id() in update_item_cache() - also use is_scalar() in place of is_numeric() when making assumptions about the shape of the primary column * Stop shaping the ID inside of get_non_cached_ids(), as item IDs are (or should be) previously shaped * Gut get_results() and make it use the query() method - this needs more work * Query: Introduce filter_search_columns() * Switch it to using apply_filters_ref_array() - minor back-compat break * Add direct Schema support * Get columns directly from Schema * Deprecate $columns var * Introduce set_query_clause_defaults() for allowing the query & request clauses to be updated easier * Add keys to query & request clauses * Refactor the way that counts & searches are parsed * Always include columns when count & groupby are used together * Pass query_vars into more parse_ methods to further abstract their usages for future un-privating * Override query_vars in parse_query() when counting * Introduce parse_count() * Rename parse_where/join to _clauses() suffix * Pass arguments into default_item(), and use array_combine() * Swap some var orders in prime_item_caches() * All: update @copyright and README
Configuration menu - View commit details
-
Copy full SHA for 9bd5c4e - Browse repository at this point
Copy the full SHA 9bd5c4eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c515b0 - Browse repository at this point
Copy the full SHA 7c515b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 811e399 - Browse repository at this point
Copy the full SHA 811e399View commit details
Commits on Jun 28, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 678cae9 - Browse repository at this point
Copy the full SHA 678cae9View commit details -
* Remove $columns * Improve query parsing to allow reuse for second COUNT(*) query_clause overrides * Add support for SELECT & EXPLAIN clauses * Add several new methods to abstract out newly repeated behaviors * Add is_valid_column() and get_query_var() and get_column_name_alias() to help with repeated code patterns * Add parse_query_vars() again, to help abstract only the parsing part * Use get_meta_type() when updating meta data * Update prime_item_caches() to not bail early so it can continue on and try updating meta data
Configuration menu - View commit details
-
Copy full SHA for de87164 - Browse repository at this point
Copy the full SHA de87164View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a0675a - Browse repository at this point
Copy the full SHA 5a0675aView commit details -
* Base: minor refactor to magic methods, and is_success() * Query: MySQL 8 support * Remove $columns * Improve query parsing to allow reuse for second COUNT(*) query_clause overrides * Add support for SELECT & EXPLAIN clauses * Add several new methods to abstract out newly repeated behaviors * Add is_valid_column() and get_query_var() and get_column_name_alias() to help with repeated code patterns * Add parse_query_vars() again, to help abstract only the parsing part * Use get_meta_type() when updating meta data * Update prime_item_caches() to not bail early so it can continue on and try updating meta data
Configuration menu - View commit details
-
Copy full SHA for 72a2266 - Browse repository at this point
Copy the full SHA 72a2266View commit details
Commits on Jun 29, 2022
-
Resolve PHPStan Level 0 errors (#144)
* Resolve PHPStan Level 0 errors * Fix boolean handling * Revert change for get_sql * Make $index public
Configuration menu - View commit details
-
Copy full SHA for 70b0c92 - Browse repository at this point
Copy the full SHA 70b0c92View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66796c4 - Browse repository at this point
Copy the full SHA 66796c4View commit details -
Query: bail early with obvious results (not $retval)
This ends up being easier to understand than following the code backwards.
Configuration menu - View commit details
-
Copy full SHA for 5b16eed - Browse repository at this point
Copy the full SHA 5b16eedView commit details
Commits on Jun 30, 2022
-
Configuration menu - View commit details
-
Copy full SHA for a5efe05 - Browse repository at this point
Copy the full SHA a5efe05View commit details -
Configuration menu - View commit details
-
Copy full SHA for fa64a8e - Browse repository at this point
Copy the full SHA fa64a8eView commit details -
Configuration menu - View commit details
-
Copy full SHA for fe344b7 - Browse repository at this point
Copy the full SHA fe344b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for c6b4d1d - Browse repository at this point
Copy the full SHA c6b4d1dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 85ea827 - Browse repository at this point
Copy the full SHA 85ea827View commit details -
Configuration menu - View commit details
-
Copy full SHA for 77310ed - Browse repository at this point
Copy the full SHA 77310edView commit details -
Configuration menu - View commit details
-
Copy full SHA for e54dfc9 - Browse repository at this point
Copy the full SHA e54dfc9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5f924b0 - Browse repository at this point
Copy the full SHA 5f924b0View commit details
Commits on Jul 2, 2022
-
Issue/55 - Query: Add support for query handlers. (#123)
* Query: Add support for query handlers. * Break apart parse_where() into multiple methods * These new methods return an array of where & join clauses * Those clauses get merged together to maintain backwards compatibility * Query: normalize Join/Where order. * Query: graduate "join" to first-class clause. * Schema: these need to stay protected * Query: remove array_flip from get_column_names * Query: docs * All: improve code consistency * Bail early with specific (non retval) values * Improve inline docs * Remove some unuseful references
Configuration menu - View commit details
-
Copy full SHA for 4ee4f51 - Browse repository at this point
Copy the full SHA 4ee4f51View commit details -
Configuration menu - View commit details
-
Copy full SHA for 563848d - Browse repository at this point
Copy the full SHA 563848dView commit details -
Configuration menu - View commit details
-
Copy full SHA for db020bf - Browse repository at this point
Copy the full SHA db020bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3054f26 - Browse repository at this point
Copy the full SHA 3054f26View commit details -
Query: rename query_handlers to query_var_parsers
Includes some subsequent renames to keep things tidy
Configuration menu - View commit details
-
Copy full SHA for 195785b - Browse repository at this point
Copy the full SHA 195785bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 824b046 - Browse repository at this point
Copy the full SHA 824b046View commit details
Commits on Jul 4, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 9757dbe - Browse repository at this point
Copy the full SHA 9757dbeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 838dc9a - Browse repository at this point
Copy the full SHA 838dc9aView commit details
Commits on Jul 5, 2022
-
Co-authored-by: Viktor Szépe <[email protected]>
Configuration menu - View commit details
-
Copy full SHA for 98a5eb9 - Browse repository at this point
Copy the full SHA 98a5eb9View commit details
Commits on Jul 13, 2022
-
Fix boolean handling in Table (#151)
`$global` is already a boolean
Configuration menu - View commit details
-
Copy full SHA for 4853bde - Browse repository at this point
Copy the full SHA 4853bdeView commit details
Commits on Apr 3, 2023
-
Configuration menu - View commit details
-
Copy full SHA for c6e06ae - Browse repository at this point
Copy the full SHA c6e06aeView commit details