Skip to content

Conversation

@JJJ
Copy link
Collaborator

@JJJ JJJ commented Feb 23, 2021

This change introduces a way to allow for copying an existing item/Row in the database, with the option to override that data via the $data parameter.

The goal of including this method as a low-level API is to reduce the amount of code necessary to support this action higher up in the application layer (global functions, etc...)

Fixes #88

This change introduces a way to allow for copying an existing item/Row in the database, with the option to override that data via the $data parameter.

The goal of including this method as a low-level API is to reduce the amount of code necessary to support this action higher up in the application layer (global functions, etc...)
@JJJ JJJ linked an issue Feb 23, 2021 that may be closed by this pull request
@JJJ JJJ merged commit f953978 into release/1.1.0 Feb 23, 2021
@JJJ JJJ deleted the issue/88 branch February 23, 2021 05:37
JJJ added a commit that referenced this pull request Feb 23, 2021
* Query: non-functional clean-up.

This change normalizes a bunch of variable names, docs, punctuation, and aliased functions (like join vs implode) - consistency!

* Query: add copy_item() method. (#89)

This change introduces a way to allow for copying an existing item/Row in the database, with the option to override that data via the $data parameter.

The goal of including this method as a low-level API is to reduce the amount of code necessary to support this action higher up in the application layer (global functions, etc...)

* Table: fix format of query inside index_exists(). (#90)

This change prevents quotes around the $column value by not preparing it, and also by making sure its value is only 1 of 2 intended columns: Key_name and Column_name.

This fixes incorrectly generated SQL, allowing this method to function as intended instead of incorrectly returning no results.

Props @ashleyfae. Fixes #87.
alexstandiford pushed a commit that referenced this pull request Jul 12, 2021
Merging this a little early so we can get Composer support in a stable version. I've been running this for a few months now and it seems to work fine.

* Move classes to PSR-4 compliant src structure

* Add composer, autoloader support & gitignore

* Add use to fix missing class issue after file move

* Date: Remove duplicate "use" statement.

* Query: non-functional clean-up.

This change normalizes a bunch of variable names, docs, punctuation, and aliased functions (like join vs implode) - consistency!

* Query: add copy_item() method. (#89)

This change introduces a way to allow for copying an existing item/Row in the database, with the option to override that data via the $data parameter.

The goal of including this method as a low-level API is to reduce the amount of code necessary to support this action higher up in the application layer (global functions, etc...)

* Table: fix format of query inside index_exists(). (#90)

This change prevents quotes around the $column value by not preparing it, and also by making sure its value is only 1 of 2 intended columns: Key_name and Column_name.

This fixes incorrectly generated SQL, allowing this method to function as intended instead of incorrectly returning no results.

Props @ashleyfae. Fixes #87.

* First pass autoloader for non-Composer setups.

Props szepeviktor.

* Check if 'where' is empty before using #101 (#102)

* Check if 'where' is empty before using #101
* Added protection against empty "where" clauses #101

Co-authored-by: John James Jacoby <[email protected]>

Co-authored-by: danieliser <[email protected]>
Co-authored-by: Ashley Gibson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add copy_item() method to Query class

1 participant