Giter Site home page Giter Site logo

Comments (5)

ianmcook avatar ianmcook commented on May 26, 2024

Hi @jimmyg3g, thanks for reporting this!

This error was happening because of a problem in the queryparser package, which tidyquery depends on, and which I also maintain.

I believe I have now resolved this in the development version of queryparser on GitHub.

I have also made a change to queryparser that silences the numerous truncating string with embedded nuls warnings.

Please reinstall the development version of queryparser from GitHub and let me know if it works for you:

remotes::install_github("ianmcook/queryparser")

from tidyquery.

jimmyg3g avatar jimmyg3g commented on May 26, 2024

Yes, it works for me, thanks!

from tidyquery.

jimmyg3g avatar jimmyg3g commented on May 26, 2024

The third example on this reprex is throwing an error:

library(tidyverse)
library(tidyquery)
mtcars_tibble <- mtcars %>% rownames_to_column(var = 'brand and model') %>%
    as_tibble()

query('SELECT mt.`brand and model` FROM mtcars_tibble as mt LIMIT 1')
#> # A tibble: 1 x 1
#>   `brand and model`
#>   <chr>            
#> 1 Mazda RX4
query("SELECT SUBSTRING_INDEX(`brand and model`, ' ', 1) as brand from mtcars_tibble LIMIT 1")
#> # A tibble: 1 x 1
#>   brand
#>   <chr>
#> 1 Mazda
query("SELECT SUBSTRING_INDEX(mt.`brand and model`, ' ', 1) as brand from mtcars_tibble as mt LIMIT 1")
#> Error in str2lang(expr_out): <text>:1:20: unexpected symbol
#> 1: SUBSTRING_INDEX(mt.`brand and model`
#>                        ^

Created on 2020-08-18 by the reprex package (v0.3.0.9001)

from tidyquery.

ianmcook avatar ianmcook commented on May 26, 2024

Oops, didn't catch that case. I just fixed it. The version of queryparser on GitHub should solve this for you.

from tidyquery.

jimmyg3g avatar jimmyg3g commented on May 26, 2024

That did the trick, thanks!

from tidyquery.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.