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

Process multiple args in \Sexpr{} #738

Merged
merged 3 commits into from Jun 20, 2018
Merged

Process multiple args in \Sexpr{} #738

merged 3 commits into from Jun 20, 2018

Conversation

@jayhesselberth
Copy link
Collaborator

@jayhesselberth jayhesselberth commented Jun 20, 2018

Sexpr with multiple args like \Sexpr[results=rd,stage=build] were not parsed correctly. Changing commas to semicolons (i.e., results=rd;stage=build) enables rlang::parse_exprs() to parse multiple args.

Closes #720

Sexpr with multiple args \Sexpr[results=rd,stage=build] were not parsed correctly

Closes #720
@jayhesselberth
Copy link
Collaborator Author

@jayhesselberth jayhesselberth commented Jun 20, 2018

rlang::parse_exprs("results=rd,stage=build")
#> Error in parse(text = x): <text>:1:11: unexpected ','
#> 1: results=rd,
#>               ^

rlang::parse_exprs("results=rd;stage=build")
#> [[1]]
#> results = rd
#> 
#> [[2]]
#> stage = build

Created on 2018-06-19 by the reprex package (v0.2.0).

@hadley
Copy link
Member

@hadley hadley commented Jun 20, 2018

Can you please include a more direct test as well?

This doesn’t feel like the right fix to me — maybe we should be mapping parse_expr instead.

@jayhesselberth
Copy link
Collaborator Author

@jayhesselberth jayhesselberth commented Jun 20, 2018

Hmm parse_expr() just calls parse_exprs(), so it would still fail to parse comma-separated expressions (only handles semicolon and newlines).

https://github.com/r-lib/rlang/blob/194d541feac3c4111c05d85b1312d8357738ea4c/R/parse.R#L55-L66

@hadley
Copy link
Member

@hadley hadley commented Jun 20, 2018

Previously we were splitting the string into pieces

@jayhesselberth jayhesselberth merged commit a12358c into master Jun 20, 2018
6 checks passed
@jayhesselberth jayhesselberth deleted the proc-sexpr branch Jun 24, 2018
krlmlr added a commit to r-dbi/DBI that referenced this issue Sep 5, 2018
clrpackages added a commit to clearlinux-pkgs/R-DBI that referenced this issue Dec 17, 2019
Charles Bailey (3):
      Add dbUnquoteIdentifier tests for valid expressions without embedded quotes
      Add dbUnquoteIdentifier tests for constructs that need quote escaping
      make dbUnquoteIdentifier more flexible with respect to embedded quotes

GitHub (1):
      Deploy from Travis build 1349 [ci skip]

Katharina Brunner (5):
      outsource history part as a separate article
      Revert "outsource history part as a separate article"
      add history part as a separate article
      add draft for introduction vignette
      incorporate comments

Kirill Müller (145):
      Deploy from Travis build 1100 [ci skip]
      Deploy from Travis build 1101 [ci skip]
      Deploy from Travis build 1103 [ci skip]
      Deploy from Travis build 1108 [ci skip]
      Deploy from Travis build 1110 [ci skip]
      Deploy from Travis build 1116 [ci skip]
      Install move probot
      Add assertion
      Remove unused call
      Document
      Link to new API
      - Improve documentation for `Id`.
      fledge: Bump version to 1.0.0.9000
      Add codecov.yml, closes #221
      Add conduct and templates
      Use LGPL 2.1, include license text
      Install pkgapi for tic
      Deploy from Travis build 1242 [ci skip]
      Also need dev pkgdown for Travis CI, for r-lib/pkgdown#738
      Deploy from Travis build 1243 [ci skip]
      Deploy from Travis build 1244 [ci skip]
      Deploy from Travis build 1249 [ci skip]
      Deploy from Travis build 1250 [ci skip]
      Deploy from Travis build 1251 [ci skip]
      Deploy from Travis build 1252 [ci skip]
      Deploy from Travis build 1253 [ci skip]
      Deploy from Travis build 1258 [ci skip]
      Deploy from Travis build 1263 [ci skip]
      Deploy from Travis build 1264 [ci skip]
      Add link to website
      roxygen2 6.1.0
      Update docs
      CoC and templates
      Simple process for reporting security vulnerabilities
      Deploy from Travis build 1265 [ci skip]
      Add badge
      Deploy from Travis build 1266 [ci skip]
      Tweaks
      fledge: Bump version to 1.0.0.9001
      Need only one CoC
      Use SVG badge
      Deploy from Travis build 1352 [ci skip]
      Deploy from Travis build 1357 [ci skip]
      Deploy from Travis build 1361 [ci skip]
      Deploy from Travis build 1364 [ci skip]
      Deploy from Travis build 1367 [ci skip]
      Travis tweaks
      Deploy from Travis build 1374 [ci skip]
      Deploy from Travis build 1393 [ci skip]
      Deploy from Travis build 1399 [ci skip]
      Deploy from Travis build 1400 [ci skip]
      Deploy from Travis build 1411 [ci skip]
      Deploy from Travis build TRUE [ci skip]
      Deploy from Travis build TRUE [ci skip]
      Deploy from Travis build 1434 [ci skip]
      Deploy from Travis build 1438 [ci skip]
      Deploy from Travis build 1444 [ci skip]
      Deploy from Travis build 1445 [ci skip]
      Deploy from Travis build 1448 [ci skip]
      Deploy from Travis build 1450 [ci skip]
      Deploy from Travis build 1452 [ci skip]
      Deploy from Travis build 1453 [ci skip]
      Deploy from Travis build 1454 [ci skip]
      Deploy from Travis build 1457 [ci skip]
      Deploy from Travis build 1460 [ci skip]
      Deploy from Travis build 1463 [ci skip]
      Deploy from Travis build 1465 [ci skip]
      Deploy from Travis build 1467 [ci skip]
      Deploy from Travis build 1468 [ci skip]
      Deploy from Travis build 1474 [ci skip]
      Deploy from Travis build 1475 [ci skip]
      Deploy from Travis build 1476 [ci skip]
      Deploy from Travis build 1478 [ci skip]
      Deploy from Travis build 1479 [ci skip]
      Deploy from Travis build 1480 [ci skip]
      Deploy from Travis build 1482 [ci skip]
      Deploy from Travis build 1483 [ci skip]
      Deploy from Travis build 1484 [ci skip]
      Deploy from Travis build 1485 [ci skip]
      Deploy from Travis build 1486 [ci skip]
      Deploy from Travis build 1487 [ci skip]
      - `dbUnquoteIdentifier()` also handles unquoted identifiers of the form `table`, `schema.table` or `catalog.schema.table`, for compatibility with dbplyr.
      Support R >= 3.2 in tests
      Fewer dev versions
      Document
      Document
      - `sqlInterpolate()` uses `dbQuoteLiteral()` instead of checking the type of the input.
      More detail for sqlInterpolate()
      Restore test
      Specify immediate argument
      Default to immediate = NULL
      Revdep results
      Bump version to 1.0.0.9002
      Deployed from gh-pages now
      Faster local installation
      Build-ignore
      Use newer backends
      - New `DBIConnector` class (#280).
      Build docs for master and release branches
      Use dev rmarkdown to work around article problem
      Document ellipsis
      - Update examples to refer to `params` instead of `param` (#235).
      Consistent documentation of conn argument
      Document
      - New `setDBIMethod()` (#235).
      Bump version to 1.0.0.9003
      Only use description once
      Use html_vignette
      Move DBI history into a separate article, #286
      Rename
      Bump version to 1.0.0.9004
      Revert "Only use description once"
      - Remove `setDBIMethod()` (#235).
      Add GitHub URL
      Qualify modifyList()
      Don't need dev version of rmarkdown
      Notes are errors
      use_tidy_description()
      One sentence per line
      README.Rmd
      fnd
      fnd
      Document
      Improve connector documentation
      Update roxygen2
      Pretty rendering of the spec
      Don't show pandoc command line
      Add reference index, closes #288
      Clarify, closes #280
      - Use specifiaction for `dbGetInfo()` (#271).
      Tweak
      From spec
      Ignore
      Bump version to 1.0.0.9006
      Document
      Remove stale NEWS entry
      Use AppVeyor
      Sync with RSQLite
      Binary
      Bump version to 1.1.0
      Up CRAN comments
      NEWS
      Less ambitious
      Fix CoC link
      Move back

Kun Ren (2):
      Add usage of SQL() to sqlInterpolate() examples
      Add a test case for sqlInterpolate() for unquoted strings using SQL()

Rich FitzJohn (1):
      Avoid parial arg match in dbWriteTable

Sean Raffuse (2):
      Support Id with catalog in dbUnquoteIdentifier
      Add tests for dbUnquoteIdentifier

jarauh (1):
      Fix documentation of dbQuoteIdentifier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants