Skip to content

IndexedDB - SELECT + where EXISTS(SELECT ...) - Error #1130

Open

Description

@Calvin-2DWeb

Hi, I'm using AlaSql with IndexedDB as selected engine, all my tables were succesfully created and stored. If I do a simple SELECT in any of those tables, everything works well...

BUT, when I try to use an EXISTS, then an error occurs.

My select query is as follow:
SELECT A.* FROM AppMenu A WHERE EXISTS( SELECT 1 FROM AppMenuPerm X WHERE X.IdMenu = A.IdMenu AND (X.IdConta = 166 OR X.IdGrupo in (5, 4)) ) ORDER BY A.Order, A.Description

this is the error that occurs:

Uncaught TypeError: Cannot read property 'data' of undefined
at T.Query.eval [as wherefn] (eval at X.Select.compileWhere (alasql.min.js?v=19.08-Q2_29-08-19_7180.16207:formatted:28022)

Someone can point me what is wrong or some fix to this?

EDIT:
Actually, at least for me, not even a very simple EXISTS works...

SELECT Desc FROM tab1 WHERE EXISTS(SELECT 1 FROM tab2 WHERE tab1.IdTab = tab2.IdTab)

AND, apparently, using localStorage instead of IndexedDB, the EXISTS seems to work, but I can't use localStorage because it's slow and doesn't have sufficient amount of storage space.

(By the way, in the Wiki page, the page about Where is saying to use EXIST instead of EXISTS, but then it trhows another error, I think that it is a typo on the Wiki page)

Details:
Version: AlaSQL v0.4.11
Engine: IndexedDB
This select is executed with: alasql.promise(sql, null).then(...

Activity

  1. mathiasrw commented on Sep 5, 2019

    @mathiasrw
    Member

    Terrible. Thank you for reporting this.

  2. biddwan09 commented on Oct 12, 2019

    @biddwan09
    Contributor

    Hi @mathiasrw I want to start contributing to this project . Can I work on this issue ?

  3. mathiasrw commented on Oct 12, 2019

    @mathiasrw
    Member

    @biddwan09 For sure!

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions