Type safe getters for JSON fields
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start by inspecting the database layer’s existing getString API and how JSON fields are currently represented. Clarify the getter names, return types, decoding behavior, and test expectations before implementing the requested type-safe JSON access; the issue does not name specific files or tests.
Written by the indexing model from the issue text.
Description
I've been working on an application where we've started adding JSON fields to our database, and I've seen a developer writing this:
$tagList = $row->getString("tags") ? json_decode($row->getString("tags")) : [];
An obvious code smell that would be greatly improved by some json functionality in the database layer.
- Dominant language
- PHP
- Stars
- 4
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from phpgt/Database
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
Enforce collation/charset more heavilyMay be free again @g105b claimed this 88 days ago, and no pull request is open. Open
-
enhancement good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 48/100
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 45/100
-
getDateTime should return `DateTime` not `DateTimeInterface`May be free again @g105b claimed this 824 days ago, and no pull request is open. Openenhancement
Similar issues
-
Awaiting Triage
Difficulty 1/5 Under an hour Newbie friendliness 92/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
WordPress/two-factor#1008 ·
Maintainers usually reply within 1 day
-
sync-en
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
sync-en
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
Maintainers usually reply within 1 day
-
Перевод устарел
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 22 days