Skip to content

problem in create trigger #73

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

Closed
zirill opened this issue Nov 10, 2014 · 4 comments
Closed

problem in create trigger #73

zirill opened this issue Nov 10, 2014 · 4 comments
Assignees

Comments

@zirill
Copy link

zirill commented Nov 10, 2014

create trigger not working:

CREATE TABLE COMPANY(
   ID INT PRIMARY KEY     NOT NULL,
   NAME           TEXT    NOT NULL,
   AGE            INT     NOT NULL,
   ADDRESS        CHAR(50),
   SALARY         REAL
);
 CREATE TABLE AUDIT(
    EMP_ID INT NOT NULL,
    ENTRY_DATE TEXT NOT NULL
);
CREATE TRIGGER audit_log AFTER INSERT
ON COMPANY
BEGIN
   INSERT INTO AUDIT(EMP_ID, ENTRY_DATE) VALUES (new.ID, datetime('now'));
END;
@lovasoa lovasoa changed the title broblem in create trigger problem in create trigger Nov 10, 2014
@lovasoa
Copy link
Member

lovasoa commented Nov 10, 2014

You are right, thank you for opening this issue. The problem is here: https://github.com/kripken/sql.js/blob/master/coffee/api.coffee#L311 .

I'm going to fix that ASAP and add it to the tests.

@zirill
Copy link
Author

zirill commented Nov 10, 2014

Many thanks for your wonderful project.
On this basis, I have now created a GUI
http://sqliteonline.com

lovasoa added a commit that referenced this issue Nov 10, 2014
lovasoa added a commit that referenced this issue Nov 10, 2014
@lovasoa lovasoa self-assigned this Nov 10, 2014
@lovasoa
Copy link
Member

lovasoa commented Nov 11, 2014

Wow http://sqliteonline.com is really impressive!
Is it open source? Do you have many visits?

@zirill
Copy link
Author

zirill commented Nov 12, 2014

Still very much did not, now there is a "closed" alpha testing.
js - only open source :)

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

2 participants