Commit graph

18 commits

Author SHA1 Message Date
78887576ef Squashed commit of the following:
commit e65c74797b
Author: Victor Westerlund <victor@vlw.se>
Date:   Thu Jan 30 08:16:27 2025 +0000

    feat: add ORDER BY statement Enum (#41)

    Importable with:
    ```php
    use vlw\MySQL\Order
    ```
    To be used with the `MySQL->order()` method, for example:
    ```php
    $db->for("table")->order(["column" => Order::ASC])->select("*");
    ```

    Reviewed-on: https://codeberg.org/vlw/php-mysql/pulls/41

commit 64c7bae3cf
Author: Victor Westerlund <victor@vlw.se>
Date:   Thu Jan 16 13:53:30 2025 +0000

    feat: add protected array property for where statement columns (#40)

    This PR adds a compliment for the `MySQL->filter_values` property but for filter columns which can be accessed from a protected scope with `MySQL->filter_columns`

    Reviewed-on: https://codeberg.org/vlw/php-mysql/pulls/40

commit d5f1efb9b9
Author: Victor Westerlund <victor@vlw.se>
Date:   Fri Dec 20 10:59:02 2024 +0000

    feat: expose SQL class properties to protected scope (#39)

    Makes sense to make these accessible when extending the MySQL class.

    Reviewed-on: https://codeberg.org/vlw/php-mysql/pulls/39

commit 619f43b3bf
Author: vlw <victor@vlw.se>
Date:   Wed Sep 25 13:28:15 2024 +0000

    fix(doc): remove reference to removed method `flatten()` from README (#38)

    Closes #14

    Reviewed-on: https://codeberg.org/vlw/php-mysql/pulls/38
    Co-authored-by: vlw <victor@vlw.se>
    Co-committed-by: vlw <victor@vlw.se>

commit 1727247fa7
Author: vlw <victor@vlw.se>
Date:   Wed Sep 25 13:27:55 2024 +0000

    fix: remove `where()` method for database models (#37)

    This PR removes the `where()` method which I don't think is particularly useful and also very untested since I don't use it personally at all. It's also probably better to do in-model checking for table columns **before** sending it off to this library when required anyways.

    Reviewed-on: https://codeberg.org/vlw/php-mysql/pulls/37
    Co-authored-by: vlw <victor@vlw.se>
    Co-committed-by: vlw <victor@vlw.se>

commit a536a3bec4
Author: vlw <victor@vlw.se>
Date:   Wed Sep 25 13:27:20 2024 +0000

    chore: rename of this package to "php-mysql" (#36)

    The name I gave this years ago "libmysqldriver" never sat right with me.. okay it might be considered a library for mysql but it's *definitely* not a driver.

    Reviewed-on: https://codeberg.org/vlw/php-mysql/pulls/36
    Co-authored-by: vlw <victor@vlw.se>
    Co-committed-by: vlw <victor@vlw.se>
2025-01-30 10:14:48 +01:00
a26db46aae
feat: define custom MySQL WHERE operators (#38)
* feat: add MySQL operators enum

* feat(doc): add custom operators to README
2024-04-16 14:31:38 +00:00
73b5d858ff
feat: reset definers when a new query starts with for() (#35)
* feat: reset definers on new query start

* feat(doc): add FOR reference to README
2024-02-26 12:51:52 +00:00
98ed26a375
feat: add executor method for DELETE statements (#34)
* feat: add executor for DELETE statements

* feat(doc): add DELETE executor ref to README
2024-02-14 11:01:03 +00:00
df00b63f35
feat: INSERT specified columns by passing assoc array to method (#33)
* feat: named columns for INSERT statements

* feat(doc): add assoc array ref to README
2024-02-14 09:15:24 +00:00
17fa248edb
feat: second int argument instead of assoc array for LIMIT and OFFSET (#32)
* feat: pass null to reset statements

* feat: limit offset as second argument

* fix(doc): change limit method in README
2024-01-12 13:24:04 +01:00
5fefc5d19f
feat: pass null to reset statements (#31) 2024-01-12 13:22:06 +01:00
111bd5c822
fix(doc): example nitpicks in README (#30) 2024-01-11 04:14:22 +01:00
4779b8b824
fix: return types for executor methods (#29)
* fix: fix return types for executor methods

* fix(doc): fix return types for executor methods in README
2024-01-08 14:30:51 +01:00
4ffa2ee24f
feat: return mysqli_result from executor methods (#27)
* feat: return mysqli_result from executor methods

* feat(doc): add mysqli_results ref. to README
2024-01-08 13:14:28 +01:00
9fe15eb00f
feat(doc): add compat notice (#23) 2023-12-24 19:48:20 +01:00
eed7a470ed
feat: remove table model by passing null to with() (#19)
* feat: remove table model by passing null to with()

* feat(doc): add with() in README
2023-11-02 11:53:54 +01:00
13720e772e
feat: accept CSV string as columns for select() (#16)
* feat: accept CSV string as columns for select()

* feat(doc): add string doc for select to README
2023-11-02 11:24:20 +01:00
5b78cc2ba2
feat: add flatten() method (#13)
* feat: add flatten() method

* feat(doc): add flatten() to README
2023-11-02 10:36:01 +01:00
84efec8938
feat(refactor): add method chaining instead of multiple method arguments (#10)
* fix: convert indent. to tabs

* feat: add method chaining

* feat(doc): add chaining to README
2023-10-26 15:00:04 +02:00
eb11bca86a
feat: add ORDER BY and LIMIT OFFSET methods (#8)
* feat: add ORDER BY and LIMIT OFFSET methods

* feat(doc): add ORDER BY and LIMIT to README
2023-10-16 13:14:21 +02:00
e501a61712
feat(doc): update for 2.x.x (#7) 2023-09-06 15:41:25 +02:00
01f5c3e2f1 initial commit 2023-04-18 21:35:27 +02:00