Skip to content
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

feat: fix spark db:table causes errors with table name including special chars #8748

Merged
merged 7 commits into from
Aug 1, 2024

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Apr 10, 2024

Description
Superesedes #8696
Fixes #6765

  • add TableName class
  • fix spark db:table causes errors with table name including special chars
$ ./spark db:table

CodeIgniter v4.5.1 Command Line Tool - Server Time: 2024-05-02 02:19:47 UTC+00:00

+-----------+----------+----------+----------+----------+------+
| hostname  | database | username | DBDriver | DBPrefix | port |
+-----------+----------+----------+----------+----------+------+
| localhost | ci4      | root     | MySQLi   |          | 3306 |
+-----------+----------+----------+----------+----------+------+

Here is the list of your database tables:
  [0]  , CONCAT('',`password`) AS `email`
  [1]  migrations

Which table do you want to see? [0, 1]: 0

Data of Table ", CONCAT('',`password`) AS `email`":

+----+------+
| id | name |
+----+------+

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added bug Verified issues on the current code behavior or pull requests that will fix them breaking change Pull requests that may break existing functionalities 4.6 labels Apr 10, 2024
@kenjis kenjis marked this pull request as draft April 10, 2024 06:57
@kenjis kenjis added enhancement PRs that improve existing functionalities database Issues or pull requests that affect the database layer labels Apr 10, 2024
@kenjis kenjis force-pushed the feat-db-tablename-object-4.6 branch 5 times, most recently from fe4d40f to 2426f8d Compare April 11, 2024 05:42
@kenjis kenjis force-pushed the feat-db-tablename-object-4.6 branch 2 times, most recently from 9c516f6 to b6ecca5 Compare May 2, 2024 00:57
@kenjis kenjis marked this pull request as ready for review May 2, 2024 02:19
@github-actions github-actions bot added the stale Pull requests with conflicts label May 5, 2024
Copy link

github-actions bot commented May 5, 2024

👋 Hi, @kenjis!

We detected conflicts in your PR against the base branch 🙊
You may want to sync 🔄 your branch with upstream!

Ref: Syncing Your Branch

@kenjis kenjis force-pushed the feat-db-tablename-object-4.6 branch from b6ecca5 to 16bd33e Compare May 6, 2024 09:00
@kenjis kenjis removed the stale Pull requests with conflicts label May 6, 2024
@kenjis kenjis force-pushed the feat-db-tablename-object-4.6 branch from 16bd33e to a72e6dd Compare May 6, 2024 10:25
@github-actions github-actions bot added the stale Pull requests with conflicts label May 23, 2024
Copy link

👋 Hi, @kenjis!

We detected conflicts in your PR against the base branch 🙊
You may want to sync 🔄 your branch with upstream!

Ref: Syncing Your Branch

@kenjis kenjis force-pushed the feat-db-tablename-object-4.6 branch from a72e6dd to 9d0f885 Compare May 23, 2024 23:02
@kenjis kenjis removed the stale Pull requests with conflicts label May 23, 2024
Copy link

👋 Hi, @kenjis!

We detected conflicts in your PR against the base branch 🙊
You may want to sync 🔄 your branch with upstream!

Ref: Syncing Your Branch

@github-actions github-actions bot added the stale Pull requests with conflicts label Jun 15, 2024
@kenjis kenjis force-pushed the feat-db-tablename-object-4.6 branch from 9d0f885 to ab90dcf Compare June 15, 2024 01:37
@kenjis kenjis removed the stale Pull requests with conflicts label Jun 15, 2024
@github-actions github-actions bot added the stale Pull requests with conflicts label Jun 21, 2024
Copy link

👋 Hi, @kenjis!

We detected conflicts in your PR against the base branch 🙊
You may want to sync 🔄 your branch with upstream!

Ref: Syncing Your Branch

@kenjis kenjis force-pushed the feat-db-tablename-object-4.6 branch from ab90dcf to f933acf Compare June 21, 2024 01:21
@kenjis kenjis removed the stale Pull requests with conflicts label Jun 21, 2024
@github-actions github-actions bot added the stale Pull requests with conflicts label Jun 23, 2024
Copy link

👋 Hi, @kenjis!

We detected conflicts in your PR against the base branch 🙊
You may want to sync 🔄 your branch with upstream!

Ref: Syncing Your Branch

@kenjis kenjis force-pushed the feat-db-tablename-object-4.6 branch from f933acf to 5de4290 Compare June 24, 2024 00:51
@kenjis kenjis removed the stale Pull requests with conflicts label Jun 24, 2024
Copy link
Contributor

@datamweb datamweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@kenjis
Copy link
Member Author

kenjis commented Jul 30, 2024

@datamweb Thank you!

@codeigniter4/core-team @codeigniter4/database-team
Can you review?

@kenjis kenjis force-pushed the feat-db-tablename-object-4.6 branch from 5de4290 to b45c49c Compare July 30, 2024 00:18
Copy link
Member

@michalsn michalsn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Is there a scenario, when the developer will want to use this new class directly? If so, we should mention this new option in the user guide, so that it doesn't become a "secret" feature.

@kenjis kenjis force-pushed the feat-db-tablename-object-4.6 branch from b45c49c to 023bae4 Compare July 31, 2024 02:17
@kenjis
Copy link
Member Author

kenjis commented Jul 31, 2024

Is there a scenario, when the developer will want to use this new class directly?

I don't know there is the need. At least, there seems to be no request.
So I added @internal to the new class for now.

If there is really demand, let's remove @internal and add the docs.

@michalsn
Copy link
Member

Sounds fair to me. Thank you!

@kenjis kenjis merged commit 6a9aedf into codeigniter4:4.6 Aug 1, 2024
42 checks passed
@kenjis kenjis deleted the feat-db-tablename-object-4.6 branch August 1, 2024 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.6 breaking change Pull requests that may break existing functionalities bug Verified issues on the current code behavior or pull requests that will fix them database Issues or pull requests that affect the database layer enhancement PRs that improve existing functionalities
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants