Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-28-2013, 01:52 AM
JohnnyChimpo JohnnyChimpo is offline
Registered User
JohnnyChimpo's Avatar
Join Date: Jun 2004
Posts: 105
JohnnyChimpo is on a distinguished road
Pragma foreign keys = ON;?

Is the use of "on delete" enabled in sqlite?
Reply With Quote
  #2  
Old 12-30-2013, 02:21 AM
JohnnyChimpo JohnnyChimpo is offline
Registered User
JohnnyChimpo's Avatar
Join Date: Jun 2004
Posts: 105
JohnnyChimpo is on a distinguished road
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;
Reply With Quote
  #3  
Old 05-02-2014, 09:31 PM
JohnnyChimpo JohnnyChimpo is offline
Registered User
JohnnyChimpo's Avatar
Join Date: Jun 2004
Posts: 105
JohnnyChimpo is on a distinguished road
BUMP


Can anyone help me with this?
Reply With Quote
  #4  
Old 05-03-2014, 12:05 AM
JohnnyChimpo JohnnyChimpo is offline
Registered User
JohnnyChimpo's Avatar
Join Date: Jun 2004
Posts: 105
JohnnyChimpo is on a distinguished road
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.
Reply With Quote
  #5  
Old 05-03-2014, 12:20 AM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
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
__________________
Quote:
Reply With Quote
  #6  
Old 05-03-2014, 01:21 AM
JohnnyChimpo JohnnyChimpo is offline
Registered User
JohnnyChimpo's Avatar
Join Date: Jun 2004
Posts: 105
JohnnyChimpo is on a distinguished road
https://sqlite.org/changes.html
2009-03-31 (3.6.12)


Are we redheaded step children?
Reply With Quote
  #7  
Old 05-04-2014, 07:07 PM
BlueMelon BlueMelon is offline
asdfg
BlueMelon's Avatar
Join Date: Sep 2008
Posts: 1,481
BlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to beholdBlueMelon is a splendid one to behold
Quote:
Originally Posted by JohnnyChimpo View Post
https://sqlite.org/changes.html
2009-03-31 (3.6.12)


Are we redheaded step children?
Uhm, yes.
__________________
http://i.imgur.com/OOJbW.jpg
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:44 AM.


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.