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

Missing space after comma inside a string being reported #233

Closed
jfacorro opened this issue Jun 3, 2015 · 1 comment
Closed

Missing space after comma inside a string being reported #233

jfacorro opened this issue Jun 3, 2015 · 1 comment
Labels

Comments

@jfacorro
Copy link
Contributor

jfacorro commented Jun 3, 2015

The comma in line SELECT unnest(regexp_split_to_array(tags, ',')) AS tag_name" from the following function is the one that gets reported:

tag_filters(DocName, #{conn := Conn} = State) ->
  TableName = atom_to_list(DocName),
  Sql = ["SELECT "
         " 'tag' AS \"type\", "
         " tag_name AS value, "
         " COUNT(1) AS \"count\" "
         "FROM ( "
         " SELECT unnest(regexp_split_to_array(tags, ',')) AS tag_name"
         " FROM ", TableName, " "
         ") AS tags "
         "GROUP BY tag_name "
         "ORDER BY tag_name "],
  Values = [],
  case get_maps(Conn, Sql, Values) of
    {ok, Maps} ->
      {ok, {raw, Maps}, State};
    {error, Error} ->
      {error, Error, State}
  end.
@jfacorro
Copy link
Contributor Author

Fixed along with #236

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

No branches or pull requests

1 participant