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

boss_db doc says find returns {error, reason} for error. It returns "undefined" (or throws exception) #259

Open
RobertSwirsky opened this issue Sep 15, 2016 · 0 comments

Comments

@RobertSwirsky
Copy link

Just a documentation bug from here: http://chicagoboss.org/doc/api-db.html as referenced in readme.md

There's only one record in device_setting, device_setting-1. One of its fields is guid.

(boss_client@master1)13>  boss_db:find("device_setting-2.guid").
undefined

(boss_client@master1)14>  boss_db:find("device_setting-1.guid").
<<"8MTWU">>

% try for an unknown column, foo, we get exception

(boss_client@master1)15>  boss_db:find("device_setting-1.foo"). 
** exception error: undefined function device_setting:foo/1
     in function  lists:foldl/3 (lists.erl, line 1262)
(boss_client@master1)16> 14:50:34.501 [info] Query SELECT * FROM device_settings WHERE id = 1

I've never seen {error, _} come out of find. Just either "undefined" or an exception.

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

No branches or pull requests

1 participant