Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/system_overview/genquery.md
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,21 @@ There are a few other options that can be used with GenQuery to affect how the r
- no-distinct: Instructs GenQuery to return all results, even repeating identical results where applicable.
- uppercase: When specified, all VALUEs should be supplied in UPPERCASE and the query will be made case-insensitive.

### Collation Order

It should be noted, with regard to the case-sensitive query defaults, that one cannot always rely on an assumed
collation order (i.e. the result of comparing mixed-case string arguments) to be followed. Because GenQuery passes

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
collation order (i.e. the result of comparing mixed-case string arguments) to be followed. Because GenQuery passes
collation order (i.e. the result of comparing mixed-case string arguments) to be followed. Because GenQuery passes

operators such as <, =, >, BETWEEN, and ORDER directly to the backing database, such assumptions are inherently

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should ORDER be ORDER-BY?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes . except in GEnQuery it's just ORDER and ORDER_DESC

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Oh right. Forgot about that in GenQuery1.

non-portable. Consider the following query, when run in the context of three data objects named `a`, `A`, and `a_`:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
non-portable. Consider the following query, when run in the context of three data objects named `a`, `A`, and `a_`:
non-portable. Consider the following query, when run in the context of three data objects named `a`, `A`, and `a_`:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

To maintain consistency throughout the file, please combine these lines so that they are one long line. The rendered text should not be affected by the change.

Comment thread
alanking marked this conversation as resolved.
Outdated

```sql
select DATA_NAME where DATA_NAME between 'a' 'a_'
```

Under the default American setup of MySQL, for example, 'A' will fall in the range defined by `between` (as corroborated

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Suggested change
Under the default American setup of MySQL, for example, 'A' will fall in the range defined by `between` (as corroborated
Under the default American setup of MySQL, for example, `A` will fall in the range defined by `between` (as corroborated

by testing the result of the query `select 'a' <= 'A' and 'A' <= 'a_'` in the mysql client) and thus be reported among
GenQuery's results; whereas under the default setup of PostgreSQL, it will not.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

To maintain consistency throughout the file, please combine these lines so that they are one long line. The rendered text should not be affected by the change.


### Attributes

GenQuery attributes can be used in concert to retrieve information about an entity or category of entities from multiple different tables. If the attributes are not related in some way that will allow for table joinery, an error will occur, so make sure the query makes logical sense. Attempting a query where the selected ATTRIBUTEs cannot be logically linked together will result in the error `CAT_FAILED_TO_LINK_TABLES` (iRODS error code -825000). If this problem occurs, consider splitting the query into multiple queries or finding another ATTRIBUTE which will accomplish the task.
Expand Down
Loading