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

[New Concept Entry for existing topic] POSTGRESQL array-constructor #4637

Merged
merged 8 commits into from May 27, 2024

Conversation

achur00
Copy link
Contributor

@achur00 achur00 commented May 11, 2024

Description

I created a new entry and file in the path docs/content/postgresql/concepts/array-constructors/array-constructors.md.

Issue Solved

Issue Solved

Closes #4592

Type of Change

  • Adding a new entry

Checklist

  • All writings are my own.
  • My entry follows the Codecademy Docs style guide.
  • My changes generate no new warnings.
  • I have performed a self-review of my own writing and code.
  • I have checked my entry and corrected any misspellings.
  • I have made corresponding changes to the documentation if needed.
  • I have confirmed my changes are not being pushed from my forked main branch.
  • I have confirmed that I'm pushing from a new branch named after the changes I'm making.
  • I have linked any issues that are relevant to this PR in the Issues Solved section.

@cigar-galaxy82 cigar-galaxy82 self-assigned this May 11, 2024
@cigar-galaxy82 cigar-galaxy82 added new entry New entry or entries status: under review Issue or PR is currently being reviewed postgresql PostgreSQL labels May 11, 2024
Tags:
- 'Arrays'
- 'Data Types'
- 'PostgresSQL'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- 'PostgresSQL'
- 'PostgreSQL'

@@ -0,0 +1,139 @@
---
Title: 'array-constructors'
Description: 'an array constructor is a method use to work with collections of data '
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Description: 'an array constructor is a method use to work with collections of data '
Description: 'An array constructor is a method used to work with collections of data'


## Example 2

Now lets create a naw table called `example 2` with `team` column and add two-dimensional values of type `text`:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Now lets create a naw table called `example 2` with `team` column and add two-dimensional values of type `text`:
Now let's create a new table called `example 2` with `team` column and add two-dimensional values of type `text`:

| --- | ------- |
| 1 | Micheal |

Finally, let try updating our table using the same idea, with the following script
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Finally, let try updating our table using the same idea, with the following script
Finally, let's try updating our table using the same idea, with the following script

@@ -0,0 +1,139 @@
---
Title: 'array-constructors'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Title: 'array-constructors'
Title: 'Array Constructors'

Finally, let try updating our table using the same idea, with the following script

```sql
update example3 set Contacts[1]='(+234)81-0000-0000' where names='Tolu';
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
update example3 set Contacts[1]='(+234)81-0000-0000' where names='Tolu';
UPDATE example3 SET Contacts[1]='(+234)81-0000-0000' WHERE names = 'Tolu';

Now, if we check our `example3` table again we will find out that the contact `(+234)81-1265-3347` has been changed to `(+234)81-0000-0000` in the table below:

```sql
select * from example3
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
select * from example3
SELECT * FROM example3


```sql
-- This creates a table named 'example1' with two columns: 'id' and 'numbers'.
-- 'id' is an auto-incrementing primary key, and 'tesm1' can hold a collection of text.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
-- 'id' is an auto-incrementing primary key, and 'tesm1' can hold a collection of text.
-- 'id' is an auto-incrementing primary key, and 'team' can hold a collection of text.


## Example 3

We have now successfully learn how to insert arrays into our postgres table, now lets learn
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
We have now successfully learn how to insert arrays into our postgres table, now lets learn
We have now successfully learned how to insert arrays into our postgres table, now let's learn

Comment on lines 72 to 73
We have now successfully learn how to insert arrays into our postgres table, now lets learn
how to access our array element using the `example3` table below:
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
We have now successfully learn how to insert arrays into our postgres table, now lets learn
how to access our array element using the `example3` table below:
We have now successfully learned how to insert arrays into our postgres table, now let's learn
how to access our array element using the `example3` table below:

@cigar-galaxy82 cigar-galaxy82 added status: waiting for author and removed status: under review Issue or PR is currently being reviewed labels May 12, 2024
@cigar-galaxy82
Copy link
Collaborator

Hi @achur00 Thank you for contributing to the Codecademy Docs

I've suggested some changes for this entry, could you please review and modify those at your earliest convenience

@achur00
Copy link
Contributor Author

achur00 commented May 13, 2024

Alright, will do, thanks.

@achur00
Copy link
Contributor Author

achur00 commented May 22, 2024

Hello @cigar-galaxy82 I have made all corrections in a new commit, let me know if you have any recommendation.

@ishg-153
Copy link
Collaborator

@cigar-galaxy82 Please approve this PR.

@achur00
Copy link
Contributor Author

achur00 commented May 22, 2024

@cigar-galaxy82 I have fixed the issue with the formatting.

@cigar-galaxy82
Copy link
Collaborator

Hi @achur00 thank you now all checks have passed.

@achur00
Copy link
Contributor Author

achur00 commented May 27, 2024

@cigar-galaxy82 Do I have something more i need to do before this can be merged?

@cigar-galaxy82 cigar-galaxy82 merged commit fe1d26e into Codecademy:main May 27, 2024
6 checks passed
Copy link

👋 @achur00
You have contributed to Codecademy Docs, and we would like to know more about you and your experience.
Please take a minute to fill out this four question survey to help us better understand Docs contributions and how we can improve the experience for you and our learners.
Thank you for your help!

🎉 Your contribution(s) can be seen here:

https://www.codecademy.com/resources/docs/postgresql/array-constructors

Please note it may take a little while for changes to become visible.
If you're appearing as anonymous and want to be credited, see here.

@cigar-galaxy82
Copy link
Collaborator

Hi @achur00 I have merged the PR

@ishg-153
Copy link
Collaborator

@cigar-galaxy82 I wasn't finished with my review. Once the second reviewer is done, then they merge the PR. Please remember this for future PRs.

@ishg-153
Copy link
Collaborator

@achur00 Are you comfortable opening a new PR to make changes within this entry? The changes are as follows:

  • Remove any personal pronouns used like our.
  • Remove the link from ## Syntax section as we avoid adding links outside of Codecademy

I will suggest a couple more direct changes to that PR and then it can be merged. When you create a new PR, tag me so we can treat it as a continuation of this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new entry New entry or entries postgresql PostgreSQL status: review 1️⃣ completed status: under review Issue or PR is currently being reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Concept Entry] Postgresql array-constructors
3 participants