Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Format long values on a single line #70

Open
nyurik opened this issue Dec 3, 2018 · 2 comments
Open

Format long values on a single line #70

nyurik opened this issue Dec 3, 2018 · 2 comments

Comments

@nyurik
Copy link

nyurik commented Dec 3, 2018

Continuing from #68

Per issue reported for Wikidata Query Service, please format multiple VALUES on a single line when they can fit. Examples:

Original text

SELECT * WHERE {
  VALUES ?a { wd:Q1 wd:Q2 ... }
}

Desired results

# short list
SELECT * WHERE {
  VALUES ?a { wd:Q1 wd:Q2 }
}
# long list
SELECT * WHERE {
  VALUES ?a {
    wd:Q1 wd:Q2 wd:Q1 wd:Q2 wd:Q1 wd:Q2 wd:Q1 wd:Q2 wd:Q1 wd:Q2 wd:Q1 wd:Q2
    wd:Q1 wd:Q2 wd:Q1 wd:Q2 wd:Q1 wd:Q2 wd:Q1 wd:Q2 wd:Q1 wd:Q2 wd:Q1 wd:Q2
  }
}

Current result

SELECT * WHERE {
  VALUES ?a {
    wd:Q1
    wd:Q2
  }
}
@RubenVerborgh
Copy link
Owner

RubenVerborgh commented Dec 3, 2018 via email

@nyurik
Copy link
Author

nyurik commented Dec 3, 2018

Per max line length config parameter (for most code its usually ~120ish(?), but obviously configurable). So if the whole VALUES fits on a single line, use it, otherwise use the long list format. Thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants