[Zorba-coders] [Merge] lp:~zorba-coders/zorba/sqlite-with-file-access into lp:zorba/sqlite-module

2013-01-24 Thread noreply
The proposal to merge lp:~zorba-coders/zorba/sqlite-with-file-access into 
lp:zorba/sqlite-module has been updated.

Status: Approved => Merged

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
-- 
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
Your team Zorba Coders is subscribed to branch lp:zorba/sqlite-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/sqlite-with-file-access into lp:zorba/sqlite-module

2013-01-24 Thread Zorba Build Bot
Validation queue job sqlite-with-file-access-2013-01-24T16-06-45.722Z is 
finished. The final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
Your team Zorba Coders is subscribed to branch lp:zorba/sqlite-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/sqlite-with-file-access into lp:zorba/sqlite-module

2013-01-24 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/sqlite-with-file-access-2013-01-24T16-06-45.722Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
Your team Zorba Coders is subscribed to branch lp:zorba/sqlite-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/sqlite-with-file-access into lp:zorba/sqlite-module

2013-01-24 Thread Luis Rodriguez Gonzalez
The proposal to merge lp:~zorba-coders/zorba/sqlite-with-file-access into 
lp:zorba/sqlite-module has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
-- 
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
Your team Zorba Coders is subscribed to branch lp:zorba/sqlite-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/sqlite-with-file-access into lp:zorba/sqlite-module

2013-01-24 Thread Luis Rodriguez Gonzalez
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
Your team Zorba Coders is subscribed to branch lp:zorba/sqlite-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/sqlite-with-file-access into lp:zorba/sqlite-module

2013-01-23 Thread Zorba Build Bot
The proposal to merge lp:~zorba-coders/zorba/sqlite-with-file-access into 
lp:zorba/sqlite-module has been updated.

Status: Approved => Needs review

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
-- 
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
Your team Zorba Coders is subscribed to branch lp:zorba/sqlite-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/sqlite-with-file-access into lp:zorba/sqlite-module

2013-01-23 Thread Zorba Build Bot
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, 
Needs Fixing < 1, Pending < 1. Got: 1 Approve, 1 Pending.
-- 
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
Your team Zorba Coders is subscribed to branch lp:zorba/sqlite-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/sqlite-with-file-access into lp:zorba/sqlite-module

2013-01-23 Thread Zorba Build Bot
Validation queue job sqlite-with-file-access-2013-01-24T06-19-40.589Z is 
finished. The final status was:

All tests succeeded!
-- 
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
Your team Zorba Coders is subscribed to branch lp:zorba/sqlite-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/sqlite-with-file-access into lp:zorba/sqlite-module

2013-01-23 Thread Chris Hillery
The proposal to merge lp:~zorba-coders/zorba/sqlite-with-file-access into 
lp:zorba/sqlite-module has been updated.

Status: Needs review => Approved

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
-- 
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
Your team Zorba Coders is subscribed to branch lp:zorba/sqlite-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/sqlite-with-file-access into lp:zorba/sqlite-module

2013-01-23 Thread Zorba Build Bot
Validation queue starting for merge proposal.
Log at: 
http://zorbatest.lambda.nu:8080/remotequeue/sqlite-with-file-access-2013-01-24T06-19-40.589Z/log.html
-- 
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
Your team Zorba Coders is subscribed to branch lp:zorba/sqlite-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


Re: [Zorba-coders] [Merge] lp:~zorba-coders/zorba/sqlite-with-file-access into lp:zorba/sqlite-module

2013-01-23 Thread Chris Hillery
Review: Approve


-- 
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
Your team Zorba Coders is subscribed to branch lp:zorba/sqlite-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/sqlite-with-file-access into lp:zorba/sqlite-module

2013-01-23 Thread Chris Hillery
The proposal to merge lp:~zorba-coders/zorba/sqlite-with-file-access into 
lp:zorba/sqlite-module has been updated.

Commit Message changed to:

Add SQLITE_WITH_FILE_ACCESS to prevent filesystem access. Defaults to same 
value as ZORBA_WITH_FILE_ACCESS when built inside Zorba, or "ON" when built 
stand-alone.

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
-- 
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
Your team Zorba Coders is subscribed to branch lp:zorba/sqlite-module.

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp


[Zorba-coders] [Merge] lp:~zorba-coders/zorba/sqlite-with-file-access into lp:zorba/sqlite-module

2013-01-23 Thread Chris Hillery
Chris Hillery has proposed merging 
lp:~zorba-coders/zorba/sqlite-with-file-access into lp:zorba/sqlite-module.

Commit message:
Add SQLITE_WITH_FILE_ACCESS to prevent filesystem access. Defaults to same 
value as ZORBA_WITH_FILE_ACCESS when built inside Zorba, or "ON" when built 
stand-alone.

Requested reviews:
  Chris Hillery (ceejatec)
  Luis Rodriguez Gonzalez (kuraru)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
-- 
https://code.launchpad.net/~zorba-coders/zorba/sqlite-with-file-access/+merge/144641
Your team Zorba Coders is subscribed to branch lp:zorba/sqlite-module.
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt	2012-11-20 16:41:36 +
+++ CMakeLists.txt	2013-01-24 06:18:21 +
@@ -42,6 +42,18 @@
 
   IF (SQLITE_FOUND)
 MESSAGE (STATUS "Found SQLite --" ${SQLITE_LIBRARIES})
+
+# Set SQLITE_WITH_FILE_ACCESS - by default will be the same value as
+# ZORBA_WITH_FILE ACCESS when built inside Zorba, or "ON" if built
+# stand-alone.
+IF (DEFINED ZORBA_WITH_FILE_ACCESS)
+  SET (_file_access ${ZORBA_WITH_FILE_ACCESS})
+ELSE (DEFINED ZORBA_WITH_FILE_ACCESS)
+  SET (_file_access ON)
+ENDIF (DEFINED ZORBA_WITH_FILE_ACCESS)
+SET(SQLITE_WITH_FILE_ACCESS ${_file_access} CACHE BOOL
+  "Allow filesystem-based SQLite databases")
+
 INCLUDE_DIRECTORIES (${SQLITE_INCLUDE_DIR})  
 
 ADD_SUBDIRECTORY("src")

=== modified file 'src/CMakeLists.txt'
--- src/CMakeLists.txt	2012-11-20 16:41:36 +
+++ src/CMakeLists.txt	2013-01-24 06:18:21 +
@@ -12,7 +12,9 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}/sqlite_module.xq.src")
+CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake"
+  "${CMAKE_CURRENT_BINARY_DIR}/sqlite_module/config.h")
+INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}")
   
 DECLARE_ZORBA_MODULE (
   URI "http://www.zorba-xquery.com/modules/sqlite";

=== added file 'src/config.h.cmake'
--- src/config.h.cmake	1970-01-01 00:00:00 +
+++ src/config.h.cmake	2013-01-24 06:18:21 +
@@ -0,0 +1,25 @@
+/*
+ * Copyright 2013 The FLWOR Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// This header is configured by the SQLite module's build process
+// -- DO NOT EDIT!
+
+#ifndef ZORBA_SQLITE_CONFIG_H
+#define ZORBA_SQLITE_CONFIG_H
+
+#cmakedefine SQLITE_WITH_FILE_ACCESS
+
+#endif /* ZORBA_SQLITE_CONFIG_H */

=== modified file 'src/sqlite_module.xq'
--- src/sqlite_module.xq	2013-01-09 15:07:19 +
+++ src/sqlite_module.xq	2013-01-24 06:18:21 +
@@ -37,7 +37,9 @@
  :
  : @return the SQLite database object as xs:anyURI.
  :
- : @error s:SQLI0001 if the databse name doesn't exist or it couldn't be opened.
+ : @error s:SQLI0001 if the database name doesn't exist or it couldn't be opened.
+ : @error s:SQLI0008 if a non-in-memory database is requested and the module
+ : is built without filesystem access
  : @error s:SQLI if there was an internal error inside SQLite library.
  :)
 declare %an:sequential function s:connect(

=== modified file 'src/sqlite_module.xq.src/sqlite_module.cpp'
--- src/sqlite_module.xq.src/sqlite_module.cpp	2013-01-09 15:07:19 +
+++ src/sqlite_module.xq.src/sqlite_module.cpp	2013-01-24 06:18:21 +
@@ -31,6 +31,7 @@
 #include 
 
 #include "sqlite_module.h"
+#include 
 
 namespace zorba { namespace sqlite {
 
@@ -566,6 +567,12 @@
 {
   return "Parameter passed is not a valid value";
 }
+#ifndef SQLITE_WITH_FILE_ACCESS
+else if(error == "SQLI0008")
+{
+  return "Only in-memory databases are allowed (Module built without filesystem access)";
+}
+#endif /* not SQLITE_WITH_FILE_ACCESS */
 else if(error == "SQLI")
 {
   return "Internal error ocurred";
@@ -909,6 +916,12 @@
 lDbName = lItemName.getStringValue().str();
 if(lDbName == "")
   lDbName = std::string(":memory:");
+
+#ifndef SQLITE_WITH_FILE_ACCESS
+if (lDbName != ":memory:") {
+  throwError("SQLI0008", getErrorMessage("SQLI0008"));
+}
+#endif /* not SQLITE_WITH_FILE_ACCESS */
 lRc = sqlite3_open_v2(lDbName.c_str(), &lSqldb, lOptions.getOptionsAsInt(), NULL);
 // Store the UUID for this connection and return it
 lStrUUID = createUUID();

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad