avelino

avelino

open source engineer at @prest

Member Since 13 years ago

@prest, Kailua-Kona, Hawaii

Experience Points
3.5k
follower
Lessons Completed
293
follow
Lessons Completed
7.2k
stars
Best Reply Awards
174
repos

1899 contributions in the last year

Pinned
⚡ The Go programming language
⚡ PostgreSQL ➕ REST, low-code, simplify and accelerate development, ⚡ instant, realtime, high-performance on any Postgres application, existing or new
⚡ Reactive Extensions for the Go language.
⚡ A curated list of awesome Go frameworks, libraries and software
⚡ The database purpose-built for stream processing applications.
⚡ :love_letter: A beautiful, fast and fully open source mail client for Mac, Windows and Linux.
Activity
Jan
18
5 days ago
Activity icon
issue

avelino issue comment avelino/awesome-go

avelino
avelino

new website for the repo

Hi guys,

i created a docusaurus website based on the repo to facilitated the usage and i deploy to vercel. I found the repo quite useful and i would like to contribute linking the site in the repo. What you guys think?

here is the link to checkout link

avelino
avelino

Let's schedule a call to talk about this project? https://cal.com/avelino/45min

Activity icon
issue

avelino issue comment avelino/awesome-go

avelino
avelino

new website for the repo

Hi guys,

i created a docusaurus website based on the repo to facilitated the usage and i deploy to vercel. I found the repo quite useful and i would like to contribute linking the site in the repo. What you guys think?

here is the link to checkout link

avelino
avelino

@fernandobelotto I like the idea of having a new layout (site) for awesome-go, what worries me is how do we keep the site up to date with automation being done in the readme?

Today we have a go code that generates the site based on the readme content

How do you do to automatically convert the awesome-go readme to Docusaurus format? I know it is readme, but there is a structure of its own.

Another point is sub-pages (SEO), read more here #3957

push

avelino push prest/prest

avelino
avelino

controller/table: describe sql building blocks it is a very stable function putting as little description as possible in each block is extremely important

Signed-off-by: Avelino [email protected]

commit sha: 6a276a4ced78377a706f04882a0f0d2f888a6815

push time in 4 days ago
push

avelino push prest/prest

avelino
avelino

adapters/pg: count _select support giving the possibility to make the account a parameter of the result, thus generating queries:

SELECT COUNT("name"), name FROM "prest"."public"."prest_users" GROUP BY "name"

and return:

[
    {"count": 2, "name": "a"},
    {"count": 1, "name": "b"}
]

ref: #647

Signed-off-by: Avelino [email protected]

avelino
avelino

controllers/tables: _count_first param support count returns a list, passing this parameter will return the first record as a non-list object ref: #647

Signed-off-by: Avelino [email protected]

avelino
avelino

add cache/test on git ignored file

Signed-off-by: Avelino [email protected]

commit sha: 9a14c8131fe369f27029b144e601839a0f67f23d

push time in 4 days ago
Activity icon
delete

avelino in prest/prest delete branch avelino/count-param-return-list-not-only-object

deleted time in 4 days ago
pull request

avelino pull request prest/prest

avelino
avelino

count param return list not only object

fixed: #647

Activity icon
issue

avelino issue prest/prest

avelino
avelino

allow count() as group function

Currently there are several aggregate (here called "group") functions implemented: https://docs.prestd.com/query-statements/#13/functions-aggregate.html

However that is not the complete list of aggregate functions natively supported by postgres.

I would like to add count(columnName|*) here.

maybe one can explore whether some of the other functions are also worth implementing. But I would like to keep the focus on this issue on count(), because I actively need that currently, to do something like:

select column, count(column) from table group by column ;

to have a list of all unique values of "column" with their associated frequency.

started
started time in 4 days ago
started
started time in 4 days ago
pull request

avelino pull request prest/prest

avelino
avelino

count param return list not only object

fixed: #647

Activity icon
created branch

avelino in prest/prest create branch avelino/count-param-return-list-not-only-object

createdAt 4 days ago
Activity icon
issue

avelino issue comment prest/prest

avelino
avelino

allow count() as group function

Currently there are several aggregate (here called "group") functions implemented: https://docs.prestd.com/query-statements/#13/functions-aggregate.html

However that is not the complete list of aggregate functions natively supported by postgres.

I would like to add count(columnName|*) here.

maybe one can explore whether some of the other functions are also worth implementing. But I would like to keep the focus on this issue on count(), because I actively need that currently, to do something like:

select column, count(column) from table group by column ;

to have a list of all unique values of "column" with their associated frequency.

avelino
avelino

Using http://localhost:3010/test/public/person?_groupby=name&_count=name Results in {"count":1}

accessing the endpoint with the mentioned parameters we execute this sql query:

SELECT COUNT("name") FROM "prest"."public"."prest_users" GROUP BY "name"

follows my example

dataset:

[
  {
    "id": 1,
    "name": "pREST Full Name",
    "username": "prest",
    "password": "8c60e97b9cf709c643e4a583b1ae9cb1",
    "metadata": null
  },
  {
    "id": 2,
    "name": "test",
    "username": "lero2",
    "password": "8c60e97b9cf709c643e4a583b1ae9cb1",
    "metadata": null
  },
  {
    "id": 3,
    "name": "test",
    "username": "lero3",
    "password": "8c60e97b9cf709c643e4a583b1ae9cb1",
    "metadata": null
  }
]

request URI:

GET /prest/public/prest_users\?_count\=name\&_groupby\=name

response:

{
  "count": 2
}

query sql (executed internment by prestd):

SELECT COUNT("name") FROM "prest"."public"."prest_users" GROUP BY "name"

the correct is to return:

{
  "count": 2,
  "count": 1,
}

had a condition to return the first record as an object (not the object list) https://github.com/prest/prest/blob/39cd7ca287f6abb6619e8ca2e84276fb59736668/controllers/tables.go#L211-L214

solution

I think it is worth having the option to return the first record, in some cases I "only" want to know the sum of the record and return it in a list I would have to interact in a list of 1 to get the result, but I agree that should not be the default behavior.

Thinking about this we are implementing a parameter called _count_first that will have the behavior to bring the first record, when not passed it will bring the list of records as it works in the execution of the query in postgres

Activity icon
issue

avelino issue comment avelino/awesome-go

avelino
avelino

Add `memlog`

Please check if what you want to add to awesome-go list meets quality standards before sending pull request. Thanks!

Please provide package links to:

Note: that new categories can be added only when there are 3 packages or more.

Make sure that you've checked the boxes below before you submit PR: not every repository (project) will fit into every option, but most projects should

  • I have added my package in alphabetical order.
  • I have an appropriate description with correct grammar.
  • I know that this package was not listed before.
  • I have added pkg.go.dev link to the repo and to my pull request.
  • I have added coverage service link to the repo and to my pull request.
  • I have added goreportcard link to the repo and to my pull request.
  • I have read Contribution guidelines, maintainers note and Quality standard.

Signed-off-by: Michael Gasch [email protected]

Thanks for your PR, you're awesome! :+1:

avelino
avelino

Thank you for contributing with awesome-go, we will revise your contribution as soon as possible.

Automation body links content check:

  • godoc.org or pkg.go.dev: True
  • goreportcard.com: True
  • coverage: True

your project is about to be approved, it's under revision, it may take a few days

started
started time in 5 days ago
Jan
17
6 days ago
Activity icon
issue

avelino issue comment avelino/awesome-go

avelino
avelino

genfuncs entry

Please check if what you want to add to awesome-go list meets quality standards before sending pull request. Thanks!

Note this is a go 1.18 package and so can not be added properly yet in coverage, goreportcard, etc.

Please provide package links to:

Note: that new categories can be added only when there are 3 packages or more.

Make sure that you've checked the boxes below before you submit PR: not every repository (project) will fit into every option, but most projects should

  • I have added my package in alphabetical order.
  • [x ] I have an appropriate description with correct grammar.
  • I know that this package was not listed before.
  • I have added pkg.go.dev link to the repo and to my pull request.
  • I have added coverage service link to the repo and to my pull request.
  • I have added goreportcard link to the repo and to my pull request.
  • I have read Contribution guidelines, maintainers note and Quality standard.

Thanks for your PR, you're awesome! :+1:

avelino
avelino

Thank you for contributing with awesome-go, we will revise your contribution as soon as possible.

Automation body links content check:

  • godoc.org or pkg.go.dev: True
  • goreportcard.com: True
  • coverage: False

your project is about to be approved, it's under revision, it may take a few days

started
started time in 5 days ago
started
started time in 5 days ago
started
started time in 5 days ago
Jan
16
1 week ago
Activity icon
issue

avelino issue comment avelino/awesome-go

avelino
avelino

add cheek job scheduler

Please check if what you want to add to awesome-go list meets quality standards before sending pull request. Thanks!

Please provide package links to:

Note: that new categories can be added only when there are 3 packages or more.

Make sure that you've checked the boxes below before you submit PR: not every repository (project) will fit into every option, but most projects should

  • I have added my package in alphabetical order.
  • I have an appropriate description with correct grammar.
  • I know that this package was not listed before.
  • I have added pkg.go.dev link to the repo and to my pull request.
  • I have added coverage service link to the repo and to my pull request.
  • I have added goreportcard link to the repo and to my pull request.
  • I have read Contribution guidelines, maintainers note and Quality standard.

Thanks for your PR, you're awesome! :+1:

avelino
avelino

Thank you for contributing with awesome-go, we will revise your contribution as soon as possible.

Automation body links content check:

  • godoc.org or pkg.go.dev: True
  • goreportcard.com: True
  • coverage: True

your project is about to be approved, it's under revision, it may take a few days

Activity icon
issue

avelino issue comment avelino/awesome-go

avelino
avelino

Add romshark/jscan

Please check if what you want to add to awesome-go list meets quality standards before sending pull request. Thanks!

Please provide package links to:

Note: that new categories can be added only when there are 3 packages or more.

Make sure that you've checked the boxes below before you submit PR: not every repository (project) will fit into every option, but most projects should

  • I have added my package in alphabetical order.
  • I have an appropriate description with correct grammar.
  • I know that this package was not listed before.
  • I have added pkg.go.dev link to the repo and to my pull request.
  • I have added coverage service link to the repo and to my pull request.
  • I have added goreportcard link to the repo and to my pull request.
  • I have read Contribution guidelines, maintainers note and Quality standard.

Thanks for your PR, you're awesome! :+1:

avelino
avelino

Thank you for contributing with awesome-go, we will revise your contribution as soon as possible.

Automation body links content check:

  • godoc.org or pkg.go.dev: True
  • goreportcard.com: True
  • coverage: True

your project is about to be approved, it's under revision, it may take a few days

Jan
15
1 week ago
Activity icon
issue

avelino issue comment prest/prest

avelino
avelino

allow count() as group function

Currently there are several aggregate (here called "group") functions implemented: https://docs.prestd.com/query-statements/#13/functions-aggregate.html

However that is not the complete list of aggregate functions natively supported by postgres.

I would like to add count(columnName|*) here.

maybe one can explore whether some of the other functions are also worth implementing. But I would like to keep the focus on this issue on count(), because I actively need that currently, to do something like:

select column, count(column) from table group by column ;

to have a list of all unique values of "column" with their associated frequency.

avelino
avelino

I'm marking this issue as a bug, but I need to do some testing and understand how we are going to resolve this issue

@trensetim do you have a proposal to do this fix?

push

avelino push prest/prest

avelino
avelino

docs: advanced queries, filter range we had not documented the time range filter fixed: #671

Signed-off-by: Avelino [email protected]

commit sha: 39cd7ca287f6abb6619e8ca2e84276fb59736668

push time in 1 week ago
pull request

avelino pull request prest/prest

avelino
avelino

docs: advanced queries, filter range

we had not documented the time range filter fixed: #671

Activity icon
delete

avelino in prest/prest delete branch avelino/docs-filter-range

deleted time in 1 week ago
Activity icon
issue

avelino issue prest/prest

avelino
avelino

How can I filter using timestamp or a range of timestamps?

I need to get a group of rows from a specific date range (stored as timestamp), I don't want to use custom query, I want to achive this using parameters.

The documentation doesn't show any example, please, Any already did it?

Activity icon
issue

avelino issue comment prest/prest

avelino
avelino

How can I filter using timestamp or a range of timestamps?

I need to get a group of rows from a specific date range (stored as timestamp), I don't want to use custom query, I want to achive this using parameters.

The documentation doesn't show any example, please, Any already did it?

avelino
avelino

@dariocf1 to filter by time range should be like this:

I apologize for not having this documented in our documentation before you opened the issue.

Here's a unit test where we do it with time range: https://github.com/prest/prest/blob/6375325d0e5a4b531090392014ebe6dc63f0a7d3/adapters/postgres/postgres_test.go#L176

pull request

avelino pull request prest/prest

avelino
avelino

docs: advanced queries, filter range

we had not documented the time range filter fixed: #671