Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   New Scripting Engine (GS2) (https://forums.graalonline.com/forums/forumdisplay.php?f=153)
-   -   Pragma foreign keys = ON;? (https://forums.graalonline.com/forums/showthread.php?t=134268956)

JohnnyChimpo 12-28-2013 02:52 AM

Pragma foreign keys = ON;?
 
Is the use of "on delete" enabled in sqlite?

JohnnyChimpo 12-30-2013 03:21 AM

Hello?(echo)

So what i am asking is can we create triggers, and use foreign keys in our schema for tables. This would be a great benefit and if we can, how do we go about setting it up. aka pragma foreign_keys =ON;

JohnnyChimpo 05-02-2014 09:31 PM

BUMP


Can anyone help me with this?

JohnnyChimpo 05-03-2014 12:05 AM

I am trying to get sqlite foreign key functionality working on my server. Basically i have a bunch of tables with some id as a primary key, and i am referencing them in another table, with the rules on delete cascade and on update cascade. However when i make the query the rules do not work. Im not sure how requestsql function is being abstracted but usually you can just do query ("pragma foreign_keys=1"); query("delete blah blah") query.commit. That does not work, and id like some insight.

fowlplay4 05-03-2014 12:20 AM

Our version of SQLite is out of date so just write your own DELETE queries.

http://sqlite.org/foreignkeys.html

This document describes the support for SQL foreign key constraints introduced in SQLite version 3.6.19.

> temp.res = SQL.executeSQL("select sqlite_version() AS sqliteversion", true);
> echo(temp.res.rows[0].sqliteversion);

echos 3.6.12

JohnnyChimpo 05-03-2014 01:21 AM

https://sqlite.org/changes.html
2009-03-31 (3.6.12)


Are we redheaded step children?

BlueMelon 05-04-2014 07:07 PM

Quote:

Originally Posted by JohnnyChimpo (Post 1727044)
https://sqlite.org/changes.html
2009-03-31 (3.6.12)


Are we redheaded step children?

Uhm, yes. :noob:


All times are GMT +2. The time now is 05:08 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.