Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE TEMP FUNCTION extractFunctionsWithComments(str STRING)
- RETURNS ARRAY<STRING>
- LANGUAGE JS AS """
- return extractFunctions(str);
- """
- OPTIONS (library="gs://github-data/functionExtractor.js")
- SELECT JSON_EXTRACT_SCALAR(func, "$.name") AS name,
- JSON_EXTRACT_SCALAR(func, "$.params") AS params,
- JSON_EXTRACT_SCALAR(func, "$.comments") AS comments,
- JSON_EXTRACT_SCALAR(func, "$.blockStart") AS blockStart,
- JSON_EXTRACT_SCALAR(func, "$.block") AS block,
- contents.path,
- FROM 'github_js.github_contents' as contents
- CROSS JOIN UNNEST(extractFunctionsWithComments(contents.content)) AS FUNC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement