mirror of
https://github.com/GAM-team/GAM.git
synced 2025-07-06 04:33:34 +00:00
Some checks failed
Build and test GAM / build (Win64, build, 7, VC-WIN64A, windows-2022) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 2, linux-aarch64, [self-hosted linux arm64]) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 4, linux-aarch64, [self-hosted linux arm64], yes) (push) Has been cancelled
Build and test GAM / build (aarch64, build, 6, darwin64-arm64, macos-14) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 1, linux-x86_64, ubuntu-22.04) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 3, linux-x86_64, ubuntu-22.04, yes) (push) Has been cancelled
Build and test GAM / build (x86_64, build, 5, darwin64-x86_64, macos-13) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 10, ubuntu-24.04, 3.10) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 11, ubuntu-24.04, 3.11) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 8, ubuntu-24.04, 3.13) (push) Has been cancelled
Build and test GAM / build (x86_64, test, 9, ubuntu-24.04, 3.9) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled
Check for Google Root CA Updates / check-apis (push) Has been cancelled
Build and test GAM / merge (push) Has been cancelled
Build and test GAM / publish (push) Has been cancelled
62 lines
2.5 KiB
Markdown
62 lines
2.5 KiB
Markdown
!# Users - Drive - Query
|
|
- [API documentation](#api-documentation)
|
|
- [Query documentation](#query-documentation)
|
|
|
|
## API documentation
|
|
* https://developers.google.com/drive/v3/reference/files
|
|
|
|
## Query documentation
|
|
* https://developers.google.com/drive/api/v3/search-files
|
|
* https://developers.google.com/drive/api/v3/ref-search-terms
|
|
* https://developers.google.com/drive/labels/guides/search-label
|
|
* https://developers.google.com/drive/activity/v2/reference/rest/v2/activity/query
|
|
|
|
From the dcoumentation above:
|
|
***
|
|
The following demonstrates operator and query term combinations:
|
|
|
|
The contains operator only performs prefix matching for a name term.
|
|
For example, suppose you have a name of HelloWorld.
|
|
A query of name contains 'Hello' returns a result, but a query of name contains 'World' doesn't.
|
|
|
|
The contains operator only performs matching on entire string tokens for the fullText term.
|
|
For example, if the full text of a document contains the string "HelloWorld",
|
|
only the query fullText contains 'HelloWorld' returns a result.
|
|
|
|
The contains operator matches on an exact alphanumeric phrase if it's surrounded by double quotes.
|
|
For example, if the fullText of a document contains the string "Hello there world",
|
|
then the query fullText contains '"Hello there"' returns a result, but the query fullText contains '"Hello world"' doesn't.
|
|
Furthermore, since the search is alphanumeric, if the full text of a document contains the string "Hello_world",
|
|
then the query fullText contains '"Hello world"' returns a result.
|
|
***
|
|
|
|
Here are some details that aren't clear from the explanation above.
|
|
|
|
All non-alphanumeric characters in the file name are replaced by a space, and a list of text tokens is produced.
|
|
All matches are case-insensitive.
|
|
On the command line, use \" to embed a " within the ''.
|
|
|
|
query "name contains 'abc def ghi'"
|
|
query "name contains '\"abc def ghi\"'"
|
|
|
|
There is a match when abc and def and ghi all have a prefix/full match of some token in the file name.
|
|
|
|
query "fullText contains 'abc def ghi'"
|
|
|
|
There is a match when abc and def and ghi all have a full match of some token in the file name.
|
|
|
|
query "fullText contains '\"abc def ghi\"'"
|
|
|
|
There is a match when "abc def ghi" has a full match with a contiguous series of tokens in the file name.
|
|
|
|
***
|
|
Here are details on how to search for public file properties.
|
|
|
|
query "properties has {key='Key' and value='Value'}"
|
|
|
|
Here are details on how to search for private file properties.
|
|
|
|
query "appProperties has {key='Key' and value='Value'}"
|
|
|
|
The keys and values must be exact matches.
|