bigtsquery icon indicating copy to clipboard operation
bigtsquery copied to clipboard

Early support for counts

Open rbuckton opened this issue 7 years ago • 7 comments

Related to #7

I started tinkering with how this might work, but unfortunately there doesn't seem to be any documentation on how to set up local support for functions.

This PR currently isn't intended to be merged, but to be discussed for feasibility.

rbuckton avatar Sep 24 '18 23:09 rbuckton

@rbuckton you can run the functions locally by running:

yarn start:functions

Is there anything else missing so you can test it?

urish avatar Sep 25 '18 13:09 urish

Unfortunately it requires permissions I don't have:

C:\dev\bigtsquery [addCount ≡]> yarn start:functions
yarn run v1.9.4
$ firebase serve --only functions

Error: Unable to authorize access to project bigtsquery

rbuckton avatar Sep 25 '18 19:09 rbuckton

What is your google account email address? I will try to authorize you on this project.

urish avatar Sep 25 '18 22:09 urish

It's the same as the email address on my GitHub profile.

rbuckton avatar Sep 25 '18 22:09 rbuckton

I've amended the commit with some changes now that I can test. The query seems like it might be working, as http://localhost:5000/bigtsquery/us-central1/count?q=ClassDeclaration%3Ahas(ExportKeyword)%3Ahas(Decorator) returns the following:

{"count":279943}

rbuckton avatar Sep 26 '18 00:09 rbuckton

There's no UI associated with this at present, I can look into that later this week.

rbuckton avatar Sep 26 '18 00:09 rbuckton

Thank you!

A few notes:

  1. Can you please remove the formatting changes in package.json and src/package.json?
  2. I see that you changed functions/src/bigquery.d.ts, where did you take the new version from?

And of course, a UI for this will be appreciated!

urish avatar Oct 01 '18 10:10 urish