18 |
19 |
20 |
21 |
22 | The MonetDB Team
23 |
24 |
25 | Last modified: Thu Jun 22 11:31:27 WEDT 2006
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/clients/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | SUBDIRS = mapilib mapiclient HAVE_ODBC?odbc HAVE_PERL?perl php HAVE_RUBYGEM?ruby examples HAVE_PYTHON2?python2 HAVE_PYTHON3?python3 NATIVE_WIN32?NT
8 |
9 | EXTRA_DIST_DIR = Tests R nodejs
10 |
--------------------------------------------------------------------------------
/clients/NT/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | scripts_bat = {
8 | EXT = bat
9 | DIR = prefix
10 | SOURCES = mclient.bat msqldump.bat stethoscope.bat
11 | }
12 |
--------------------------------------------------------------------------------
/clients/NT/mclient.bat:
--------------------------------------------------------------------------------
1 | @REM This Source Code Form is subject to the terms of the Mozilla Public
2 | @REM License, v. 2.0. If a copy of the MPL was not distributed with this
3 | @REM file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | @REM
5 | @REM Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | @echo off
8 | rem figure out the folder name
9 | set MONETDB=%~dp0
10 |
11 | rem remove the final backslash from the path
12 | set MONETDB=%MONETDB:~0,-1%
13 |
14 | rem extend the search path with our EXE and DLL folders
15 | rem we depend on pthreadVCE.dll having been copied to the lib folder
16 | set PATH=%MONETDB%\bin;%MONETDB%\lib;%MONETDB%\lib\bin;%PATH%
17 |
18 | if not "%1"=="/STARTED-FROM-MENU" goto skip
19 | shift
20 | if "%DOTMONETDBFILE%"=="" if exist "%MONETDB%\etc\.monetdb" set DOTMONETDBFILE=%MONETDB%\etc\.monetdb
21 | :skip
22 |
23 | rem start the real client
24 | "%MONETDB%\bin\mclient.exe" %1 %2 %3 %4 %5 %6 %7 %8
25 |
26 | if ERRORLEVEL 1 pause
27 |
--------------------------------------------------------------------------------
/clients/NT/msqldump.bat:
--------------------------------------------------------------------------------
1 | @REM This Source Code Form is subject to the terms of the Mozilla Public
2 | @REM License, v. 2.0. If a copy of the MPL was not distributed with this
3 | @REM file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | @REM
5 | @REM Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | @rem figure out the folder name
8 | @set MONETDB=%~dp0
9 |
10 | @rem remove the final backslash from the path
11 | @set MONETDB=%MONETDB:~0,-1%
12 |
13 | @rem extend the search path with our EXE and DLL folders
14 | @rem we depend on pthreadVCE.dll having been copied to the lib folder
15 | @set PATH=%MONETDB%\bin;%MONETDB%\lib;%MONETDB%\lib\bin;%PATH%
16 |
17 | @rem start the real client
18 | @"%MONETDB%\bin\msqldump.exe" %*
19 |
20 | @if ERRORLEVEL 1 pause
21 |
--------------------------------------------------------------------------------
/clients/NT/stethoscope.bat:
--------------------------------------------------------------------------------
1 | @REM This Source Code Form is subject to the terms of the Mozilla Public
2 | @REM License, v. 2.0. If a copy of the MPL was not distributed with this
3 | @REM file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | @REM
5 | @REM Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | @echo off
8 | rem figure out the folder name
9 | set MONETDB=%~dp0
10 |
11 | rem remove the final backslash from the path
12 | set MONETDB=%MONETDB:~0,-1%
13 |
14 | rem extend the search path with our EXE and DLL folders
15 | rem we depend on pthreadVCE.dll having been copied to the lib folder
16 | set PATH=%MONETDB%\bin;%MONETDB%\lib;%MONETDB%\lib\bin;%PATH%
17 |
18 | rem start the real client
19 | "%MONETDB%\bin\stethoscope.exe" %1 %2 %3 %4 %5 %6 %7 %8
20 |
21 | if ERRORLEVEL 1 pause
22 |
--------------------------------------------------------------------------------
/clients/R/MonetDB.R/DESCRIPTION:
--------------------------------------------------------------------------------
1 | Package: MonetDB.R
2 | Version: 1.0.0
3 | Title: Connect MonetDB to R
4 | Authors@R: c(person("Hannes Muehleisen", role = c("aut", "cre"),email = "hannes@cwi.nl"),
5 | person("Thomas Lumley", role = "ctb"),
6 | person("Anthony Damico", role = "ctb"))
7 | Author: Hannes Muehleisen [aut, cre], Thomas Lumley [ctb], Anthony Damico [ctb]
8 | Maintainer: Hannes Muehleisen
9 | Depends: DBI (>= 0.3.1)
10 | Imports: digest (>= 0.6.4), methods, codetools
11 | Enhances: dplyr (>= 0.3.0)
12 | Description: Allows to pull data from MonetDB into R. Includes a DBI implementation and a dplyr backend.
13 | License: MPL (== 2.0)
14 | URL: http://monetr.r-forge.r-project.org
15 | SystemRequirements: MonetDB, available from http://www.monetdb.org
16 | Collate: mapi.R dbi.R dbapply.R dplyr.R control.R
17 |
--------------------------------------------------------------------------------
/clients/R/MonetDB.R/man/monetdbRtype.Rd:
--------------------------------------------------------------------------------
1 | \name{monetdbRtype}
2 | \alias{monetdbRtype}
3 |
4 | \title{
5 | Get the name of the R data type for a database type.
6 | }
7 | \description{
8 | For a database data type, get the name of the R data type it is being translated to.
9 | }
10 | \usage{
11 | monetdbRtype ( dbType )
12 | }
13 | \arguments{
14 | \item{dbType}{A database type string such as \code{CHAR} or \code{INTEGER}.}
15 | }
16 |
17 | \value{
18 | String containing the R data type for the DB data type, e.g. \code{character} or \code{numeric}.
19 | }
20 |
--------------------------------------------------------------------------------
/clients/R/MonetDB.R/man/mq.Rd:
--------------------------------------------------------------------------------
1 | \name{mq}
2 | \alias{mq}
3 |
4 | \title{
5 | Connect to a database, run a single SELECT query, and disconnect again.
6 | }
7 | \description{
8 | \code{mq(...)} provides a short way to connect to a MonetDB database, run a single SELECT query, and disconnect again.
9 | }
10 | \usage{
11 | mq(dbname, query, ...)
12 | }
13 | \arguments{
14 | \item{dbname}{Database name}
15 | \item{query}{SQL SELECT query to run}
16 | \item{...}{Other options for \code{\link[DBI]{dbConnect}}}
17 | }
18 | \value{
19 | Returns a data frame that contains the result of the passed query or an error if something went wrong.
20 | }
21 |
22 | \seealso{
23 | \code{\link[DBI]{dbConnect}}
24 | \code{\link[MonetDB.R]{mc}}
25 | }
26 | \examples{
27 | \dontrun{
28 | mq("demo","SELECT 1")
29 | }}
30 |
--------------------------------------------------------------------------------
/clients/R/MonetDB.R/src/Makevars.win:
--------------------------------------------------------------------------------
1 | PKG_LIBS= -lws2_32 -lpthread
2 |
--------------------------------------------------------------------------------
/clients/R/MonetDB.R/src/mapisplit.h:
--------------------------------------------------------------------------------
1 | void mapi_unescape(char* in, char* out);
2 | void mapi_line_split(char* line, char** out, size_t ncols);
3 |
--------------------------------------------------------------------------------
/clients/R/build-for-cran.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | # set this to a path where the latest svn version or R was installed.
4 | # CRAN policies state that R CMD check must use the latest version
5 | R=~/r-trunk-install/R.framework/Resources/bin/R
6 |
7 | # can't have these in a R package, it wont build
8 | find MonetDB.R -name "Makefile*" -exec rm {} \;
9 | find MonetDB.R -name ".DS_Store" -exec rm {} \;
10 |
11 | # for now, no profiler
12 | rm MonetDB.R/src/profiler*
13 | rm MonetDB.R/src/Makevars.win
14 |
15 | # binary leftovers
16 | rm MonetDB.R/src/*.o
17 | rm MonetDB.R/src/*.so
18 |
19 | # remove windows artefacts
20 | rm -r MonetDB.R/src-*
21 |
22 | rm MonetDB.R_*.tar.gz
23 | mkdir -p /tmp/rcheck
24 |
25 | $R CMD build MonetDB.R
26 | $R CMD check -o /tmp/rcheck --as-cran MonetDB.R_*.tar.gz
27 |
28 | hgid=`hg id -i | sed s/+//`
29 | newname=`basename MonetDB.R_*.tar.gz .tar.gz`-$hgid.tar.gz
30 | mv MonetDB.R_*.tar.gz $newname
31 |
--------------------------------------------------------------------------------
/clients/examples/C/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | MTSAFE
8 | INCLUDES = ../../mapilib ../../../common/options $(READLINE_INCS)
9 |
10 | MAPI_LIBS = $(SOCKET_LIBS)
11 |
12 | BINS = {
13 | CONDINST = HAVE_TESTING
14 | DIR = bindir
15 | SOURCES = sample0.c sample1.c sample2.c sample3.c sample4.c \
16 | smack00.c smack01.c
17 | LIBS = $(MAPI_LIBS) ../../mapilib/libmapi \
18 | $(curl_LIBS)
19 | }
20 |
--------------------------------------------------------------------------------
/clients/examples/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | SUBDIRS = C php
8 |
9 | EXTRA_DIST_DIR = python
10 |
--------------------------------------------------------------------------------
/clients/examples/php/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | MTSAFE
8 |
9 | scripts_php = {
10 | COND = HAVE_TESTING
11 | DIR = bindir
12 | SOURCES = sqlsample.php
13 | }
14 |
--------------------------------------------------------------------------------
/clients/examples/python/perf.py:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | import time
8 |
9 | #configure the logger, so we can see what is happening
10 | #import logging
11 | #logging.basicConfig(level=logging.DEBUG)
12 | #logger = logging.getLogger('monetdb')
13 |
14 |
15 | try:
16 | import monetdb.sql
17 | except ImportError:
18 | # running examples from development tree
19 | import sys
20 | import os
21 | parent = os.path.join(sys.path[0], os.pardir)
22 | sys.path.append(parent)
23 | import monetdb.sql
24 |
25 | t = time.time()
26 | x = monetdb.sql.connect(database="demo")
27 | c = x.cursor()
28 | c.arraysize=10000
29 | c.execute('select * from tables, tables')
30 | results = c.fetchall()
31 |
--------------------------------------------------------------------------------
/clients/mapiclient/ReadlineTools.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef READLINETOOLS_H_INCLUDED
10 | #define READLINETOOLS_H_INCLUDED
11 |
12 | #ifdef HAVE_LIBREADLINE
13 |
14 | #include
15 |
16 | void init_readline(Mapi mid, char *language, int save_history);
17 | void deinit_readline(void);
18 | void save_line(const char *s);
19 | rl_completion_func_t *suspend_completion(void);
20 | void continue_completion(rl_completion_func_t * func);
21 |
22 | #endif /* HAVE_LIBREADLINE */
23 | #endif /* READLINETOOLS_H_INCLUDED */
24 |
--------------------------------------------------------------------------------
/clients/mapiclient/dotmonetdb.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | extern void parse_dotmonetdb(char **user, char **passwd, char **language,
10 | int *save_history, char **output, int *pagewidth);
11 |
--------------------------------------------------------------------------------
/clients/mapilib/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | MTSAFE
8 |
9 | INCLUDES = ../../common/options ../../common/stream ../../common/utils \
10 | $(MSGCONTROL_FLAGS)
11 |
12 | lib_mapi = {
13 | VERSION = $(MAPI_VERSION)
14 | SOURCES = mapi.c mapi.rc
15 | LIBS = $(SOCKET_LIBS) ../../common/stream/libstream \
16 | ../../common/options/libmoptions \
17 | ../../common/utils/libmcrypt $(openssl_LIBS)
18 | }
19 |
20 | headers_mapi = {
21 | DIR = includedir/monetdb
22 | HEADERS = h
23 | SOURCES = mapi.h
24 | }
25 |
26 | headers_pc = {
27 | COND = NOT_WIN32
28 | HEADERS = pc
29 | DIR = libdir/pkgconfig
30 | SOURCES = monetdb-mapi.pc.in
31 | }
32 |
--------------------------------------------------------------------------------
/clients/mapilib/mapi.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fpgasystems/doppiodb/a6668192b90d4372303c2b79eeff97eb8089792b/clients/mapilib/mapi.rc
--------------------------------------------------------------------------------
/clients/mapilib/monetdb-mapi.pc:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | prefix=/home/kkara/Projects/MyMonetDB
8 | exec_prefix=${prefix}
9 | libdir=${exec_prefix}/lib
10 | includedir=${prefix}/include
11 |
12 | Name: monetdb-mapi
13 | Description: MonetDB MAPI C-client libary
14 | Version: 11.21.19
15 | Requires: monetdb-stream openssl
16 |
17 | Libs: -L${libdir} -lmapi
18 | Cflags: -I${includedir}/monetdb
19 |
--------------------------------------------------------------------------------
/clients/mapilib/monetdb-mapi.pc.in:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | prefix=@prefix@
8 | exec_prefix=@exec_prefix@
9 | libdir=@libdir@
10 | includedir=@includedir@
11 |
12 | Name: monetdb-mapi
13 | Description: MonetDB MAPI C-client libary
14 | Version: @PACKAGE_VERSION@
15 | Requires: monetdb-stream openssl
16 |
17 | Libs: -L${libdir} -lmapi @SOCKET_LIBS@
18 | Cflags: -I${includedir}/monetdb
19 |
--------------------------------------------------------------------------------
/clients/nodejs/monetdb/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "monetdb",
3 | "version": "0.2.7",
4 | "description": "Connect MonetDB and node.js",
5 | "main": "mapiclient.js",
6 | "author": "Hannes Mühleisen ",
7 | "license": "MonetDB License, https://www.monetdb.org/Legal/MonetDBLicense",
8 | "repository" : { "type" : "hg", "url" : "http://dev.monetdb.org/hg/MonetDB/"},
9 | "bugs": { "url": "https://www.monetdb.org/bugzilla/"}
10 | }
11 |
--------------------------------------------------------------------------------
/clients/odbc/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | SUBDIRS = NOT_WIN32?setup:winsetup \
8 | driver samples
9 |
--------------------------------------------------------------------------------
/clients/odbc/driver/Copyright:
--------------------------------------------------------------------------------
1 | The code in this directory is based on the unixODBC driver template
2 | written by Peter Harvey (pharvey@codebydesign.com). The unixODBC
3 | driver template is part of the source distribution of unixODBC which
4 | can be downloaded from http://www.unixODBC.org/.
5 |
6 | The original code is licensed under the terms of the LGPL (GNU Library
7 | General Public License, Version 2, June 1991), and therefore the code
8 | in this directory is also licensed under the LPGL (see the file
9 | COPYING in this directory), unlike the other directories in this
10 | project which are under the Mozilla Public License, v. 2.0.
11 |
12 | All original files have been modified, often heavily, and some have
13 | been deleted since they were originally copied in June 2001. The
14 | original code was a template for an ODBC driver, whereas the current
15 | code attempts to implement the ODBC driver for the SQL server which is
16 | part of the MonetDB project.
17 |
--------------------------------------------------------------------------------
/clients/odbc/driver/driver.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fpgasystems/doppiodb/a6668192b90d4372303c2b79eeff97eb8089792b/clients/odbc/driver/driver.rc
--------------------------------------------------------------------------------
/clients/odbc/samples/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | MTSAFE
8 |
9 | INCLUDES = $(ODBC_INCS)
10 |
11 | BINS = {
12 | CONDINST = HAVE_TESTING
13 | DIR = libdir/monetdb/tests
14 | SOURCES = odbcsample1.c testgetinfo.c arraytest.c
15 | LIBS = $(ODBC_LIBS)
16 | }
17 |
--------------------------------------------------------------------------------
/clients/odbc/setup/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | DEFS = @DEFS@
8 |
9 | INCLUDES = $(ODBC_INCS)
10 |
11 | lib_MonetODBCs = {
12 | MODULE
13 | SOURCES = drvcfg.c drvcfg.h
14 | }
15 |
--------------------------------------------------------------------------------
/clients/odbc/winsetup/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | INCLUDES = \
8 | ../include \
9 | ../driver \
10 | -I$(MONETDB_INCLUDEDIR) \
11 | $(ODBC_INCS)
12 |
13 | DEFS = @DEFS@
14 | ODBCLIBS = -lodbc32 -lodbccp32 -lversion -lshlwapi -luser32 $(LEGACY_STDIO_DEFINITIONS)
15 |
16 | lib_MonetODBCs = {
17 | SOURCES = setup.c setup.rc setup.syms resource.h
18 | LIBS = -lodbccp32 -luser32 $(LEGACY_STDIO_DEFINITIONS)
19 | }
20 |
21 | bin_odbcinstall = {
22 | SOURCES = install.c
23 | LIBS = -lodbc32 -lodbccp32 -lversion -lshlwapi -luser32 $(LEGACY_STDIO_DEFINITIONS)
24 | }
25 |
26 | EXTRA_DIST = banner.bmp
27 |
--------------------------------------------------------------------------------
/clients/odbc/winsetup/banner.bmp:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fpgasystems/doppiodb/a6668192b90d4372303c2b79eeff97eb8089792b/clients/odbc/winsetup/banner.bmp
--------------------------------------------------------------------------------
/clients/odbc/winsetup/setup.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fpgasystems/doppiodb/a6668192b90d4372303c2b79eeff97eb8089792b/clients/odbc/winsetup/setup.rc
--------------------------------------------------------------------------------
/clients/odbc/winsetup/setup.syms:
--------------------------------------------------------------------------------
1 | DllMain
2 | ConfigDSN
3 | ConfigDriver
4 |
--------------------------------------------------------------------------------
/clients/perl/DBD/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | MTSAFE
8 |
9 | SUBDIRS = monetdb
10 |
11 | headers_perl = {
12 | HEADERS = pl pm
13 | DIR = $(prefix)/$(PERL_LIBDIR)/DBD
14 | SOURCES = monetdb.pm
15 | }
16 |
--------------------------------------------------------------------------------
/clients/perl/DBD/monetdb/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | MTSAFE
8 |
9 | headers_perl = {
10 | HEADERS = pm
11 | DIR = $(prefix)/$(PERL_LIBDIR)/DBD/monetdb
12 | SOURCES = GetInfo.pm TypeInfo.pm
13 | }
14 |
--------------------------------------------------------------------------------
/clients/perl/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | MTSAFE
8 |
9 | SUBDIRS = MonetDB-CLI-MapiPP MonetDB-CLI DBD Tests
10 |
11 | headers_perl = {
12 | HEADERS = pm
13 | DIR = $(prefix)/$(PERL_LIBDIR)
14 | SOURCES = Mapi.pm
15 | }
16 |
--------------------------------------------------------------------------------
/clients/perl/MonetDB-CLI-MapiPP/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | SUBDIRS = MonetDB
8 |
--------------------------------------------------------------------------------
/clients/perl/MonetDB-CLI-MapiPP/MonetDB/CLI/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | MTSAFE
8 |
9 | headers_perl = {
10 | HEADERS = pm
11 | DIR = $(prefix)/$(PERL_LIBDIR)/MonetDB/CLI
12 | SOURCES = MapiPP.pm
13 | }
14 |
--------------------------------------------------------------------------------
/clients/perl/MonetDB-CLI-MapiPP/MonetDB/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | SUBDIRS = CLI
8 |
--------------------------------------------------------------------------------
/clients/perl/MonetDB-CLI/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | SUBDIRS = MonetDB
8 |
--------------------------------------------------------------------------------
/clients/perl/MonetDB-CLI/MonetDB/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | MTSAFE
8 |
9 | headers_perl = {
10 | HEADERS = pm
11 | DIR = $(prefix)/$(PERL_LIBDIR)/MonetDB
12 | SOURCES = CLI.pm
13 | }
14 |
--------------------------------------------------------------------------------
/clients/perl/Tests/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | MTSAFE
8 |
9 | scripts_pl = {
10 | COND = HAVE_TESTING
11 | DIR = bindir
12 | SOURCES = sqlsample.pl.in malsample.pl.in
13 | }
14 |
15 | EXTRA_DIST = client.pl smack00.pl smack01.pl
16 |
17 |
--------------------------------------------------------------------------------
/clients/perl/Tests/client.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/perl
2 | # This script implements the supersmack benchmark obtained from Mysql
3 |
4 | use Mapi;
5 |
6 | my ($monet, $line);
7 | $monet = new Mapi( Mapi::hostname() . ':' . Mapi::portnr(), $ENV{'USER'}, '' );
8 |
9 | print "Start the application\n";
10 | while(($line= <>) !~ "quit.*"){
11 | print "send req";
12 | $reply= $monet->cmd($line);
13 | print "got reply";
14 | if( $monet->error() ){
15 | $monet->explain();
16 | } else { print $reply;}
17 | }
18 |
19 | $monet->disconnect();
20 |
21 | 1;
22 |
23 |
--------------------------------------------------------------------------------
/clients/perl/Tests/smack00.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/perl
2 | # This script implements the supersmack benchmark obtained from Mysql
3 |
4 | use Mapi;
5 |
6 | my ($monet, $line);
7 | $monet = new Mapi( Mapi::hostname() . ':' . Mapi::portnr(), $ENV{'USER'}, '' );
8 |
9 | print "Start the application\n";
10 | my($i)=0;
11 | for($i=0; $i<100000; $i++){
12 | $reply= $monet->cmd("print(1);");
13 | #if( $monet->error() ){
14 | #$monet->explain();
15 | #} else { print $reply;}
16 | #printf $reply;
17 | }
18 |
19 | $monet->disconnect();
20 |
21 | 1;
22 |
23 |
--------------------------------------------------------------------------------
/clients/perl/Tests/smack01.pl:
--------------------------------------------------------------------------------
1 | #!/usr/bin/perl
2 | # This script implements the supersmack benchmark obtained from Mysql
3 |
4 | use Mapi;
5 |
6 | my ($monet, $line);
7 | $monet = new Mapi( Mapi::hostname() . ':' . Mapi::portnr(), $ENV{'USER'}, '' );
8 |
9 | print "Start SQL\n";
10 | $reply= $monet->cmd("sql();");
11 | if( $monet->error() ){
12 | $monet->explain();
13 | }
14 | my($i)=0;
15 | for($i=0; $i<10; $i++){
16 | $reply= $monet->cmd("select count(*) from tables;");
17 | if( $monet->error() ){
18 | $monet->explain();
19 | } else { print $reply;}
20 | }
21 |
22 | $monet->disconnect();
23 |
24 | 1;
25 |
26 |
--------------------------------------------------------------------------------
/clients/php/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | MTSAFE
8 |
9 | SUBDIRS = lib
10 |
11 | EXTRA_DIST_DIR = doc examples
12 |
--------------------------------------------------------------------------------
/clients/php/README:
--------------------------------------------------------------------------------
1 | = Native PHP implementation of the MonetDB interface. =
2 |
3 | The php API aims at being compatible with the one provided by the C implementation.
4 |
5 | == Directory structure ==
6 | - lib/
7 | php_mapi.inc - mapi protocol implementation
8 | php_monetdb.php - php api
9 |
10 | - examples/simple_query.php - an example of php+monetdb in action
11 |
12 | - INSTALL - note about installing and using the native interface
13 |
14 | - TODO: list of pending tasks.
15 |
16 | == Benchmark ==
17 |
18 | A comparison between cimpl and native can be found at: http://www.ins.cwi.nl/~gm/bench/
19 |
20 | php_test.tar.bz2 - contains an utility to measure the performance of the two php APIS.
21 |
--------------------------------------------------------------------------------
/clients/php/TODO:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fpgasystems/doppiodb/a6668192b90d4372303c2b79eeff97eb8089792b/clients/php/TODO
--------------------------------------------------------------------------------
/clients/php/doc/generate_doc.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 | #
7 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
8 |
9 | #
10 | #
11 | # Generates (html) documentation from source code comments.
12 | #
13 | # Requires: phpdoc (http://www.phpdoc.org/)
14 | #
15 | # Usage: generate_doc.sh
16 | #
17 | # By default is located within the source tree 'doc/' directory
18 | #
19 |
20 | source_code=$1
21 |
22 | current_dir=$(pwd)
23 | doc_dir=$current_dir/$2
24 |
25 | title="MonetDB5 PHP API"
26 |
27 | phpdoc -ti $title -o "HTML:frames:phpedit" -f $source_code -t $doc_dir
28 |
--------------------------------------------------------------------------------
/clients/php/lib/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | MTSAFE
8 |
9 | headers_php = {
10 | DIR = datadir/php/monetdb
11 | HEADERS = php inc
12 | SOURCES = php_mapi.inc php_monetdb.php
13 | }
14 |
--------------------------------------------------------------------------------
/clients/python2/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | python2_setup = {
8 | FILES = setup.py
9 | }
10 |
11 | EXTRA_DIST = README.rst setup.py
12 | EXTRA_DIST_DIR = monetdb test
13 |
--------------------------------------------------------------------------------
/clients/python2/monetdb/__init__.py:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | """
8 | This is the MonetDB Python API.
9 |
10 | The MAPI (MonetDB API) related code is in monetdb.mapi.
11 |
12 | The SQL related code is in monetdb.sql.
13 |
14 | To set up a connection use monetdb.sql.connect()
15 |
16 | """
17 | from monetdb import sql
18 | from monetdb import mapi
19 | from monetdb import exceptions
20 |
21 | __all__ = ["sql", "mapi"]
22 |
23 | # for backwards compatability
24 | monetdb_exceptions = exceptions
25 |
--------------------------------------------------------------------------------
/clients/python3/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | python3_setup = {
8 | FILES = setup.py
9 | }
10 |
11 | EXTRA_DIST = README.rst setup.py
12 | EXTRA_DIST_DIR = monetdb test
13 |
--------------------------------------------------------------------------------
/clients/python3/monetdb/__init__.py:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | """
8 | This is the MonetDB Python API.
9 |
10 | The MAPI (MonetDB API) related code is in monetdb.mapi.
11 |
12 | The SQL related code is in monetdb.sql.
13 |
14 | To set up a connection use monetdb.sql.connect()
15 |
16 | """
17 | from monetdb import sql
18 | from monetdb import mapi
19 | from monetdb import exceptions
20 |
21 | __all__ = ["sql", "mapi"]
22 |
23 | # for backwards compatability
24 | monetdb_exceptions = exceptions
25 |
--------------------------------------------------------------------------------
/clients/ruby/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | SUBDIRS = adapter
8 |
9 | gem_monetdb = {
10 | FILES = ruby-monetdb-sql-0.1.gemspec
11 | DIR = $(RUBY_DIR)
12 | }
13 |
14 | EXTRA_DIST = Changelog README TODO ruby-monetdb-sql-0.1.gemspec
15 | EXTRA_DIST_DIR = examples lib
16 |
--------------------------------------------------------------------------------
/clients/ruby/TODO:
--------------------------------------------------------------------------------
1 | * test and improve utf8 and type conversion
2 |
3 | * documentation cleanup
4 |
5 | * OSM on rails demo (slowed down due to third party plugins requirements)
6 |
--------------------------------------------------------------------------------
/clients/ruby/adapter/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | gem_adapter = {
8 | FILES = activerecord-monetdb-adapter-0.1.gemspec
9 | DIR = $(RUBY_DIR)
10 | }
11 |
12 | EXTRA_DIST = activerecord-monetdb-adapter-0.1.gemspec
13 | EXTRA_DIST_DIR = active_record lib
14 |
--------------------------------------------------------------------------------
/clients/ruby/adapter/activerecord-monetdb-adapter-0.1.gemspec:
--------------------------------------------------------------------------------
1 | Gem::Specification.new do |s|
2 | s.required_ruby_version = '>= 1.8.0'
3 | s.name = %q{activerecord-monetdb-adapter}
4 | s.version = "0.1"
5 | s.date = %q{2009-05-18}
6 | s.authors = ["G Modena"]
7 | s.email = "info@monetdb.org"
8 | s.licenses = ["MPL-2.0"]
9 | s.summary = %q{ActiveRecord Connector for MonetDB}
10 | s.homepage = %q{http://www.monetdb.org/}
11 | s.description = %q{ActiveRecord Connector for MonetDB built on top of the pure Ruby database driver}
12 | s.files = [ "lib/active_record/connection_adapters/monetdb_adapter.rb" ]
13 | s.has_rdoc = true
14 | s.require_path = 'lib'
15 | s.add_dependency(%q, [">= 2.3.2"])
16 | s.add_dependency(%q, [">= 0.1"])
17 | # placeholder project to avoid warning about not having a rubyforge_project
18 | s.rubyforge_project = "nowarning"
19 | end
20 |
--------------------------------------------------------------------------------
/clients/ruby/ruby-monetdb-sql-0.1.gemspec:
--------------------------------------------------------------------------------
1 |
2 | Gem::Specification.new do |s|
3 | s.required_ruby_version = '>= 1.8.0'
4 | s.name = %q{ruby-monetdb-sql}
5 | s.version = "0.1"
6 | s.date = %q{2009-04-27}
7 | s.authors = ["G Modena"]
8 | s.email = "info@monetdb.org"
9 | s.license = "MPL-2.0"
10 | s.summary = %q{Pure Ruby database driver for MonetDB/SQL}
11 | s.homepage = %q{http://www.monetdb.org/}
12 | s.description = %q{Pure Ruby database driver for the MonetDB/SQL columnar database management system}
13 | s.files = ["README", "lib/MonetDB.rb", "lib/MonetDBConnection.rb", "lib/MonetDBData.rb", "lib/MonetDBExceptions.rb", "lib/hasher.rb"]
14 | s.has_rdoc = true
15 | s.require_path = './lib'
16 | # placeholder project to avoid warning about not having a rubyforge_project
17 | s.rubyforge_project = "nowarning"
18 | end
19 |
--------------------------------------------------------------------------------
/common/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | SUBDIRS = stream options utils
8 |
--------------------------------------------------------------------------------
/common/options/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | ## Process this file with automake to produce Makefile.in
8 |
9 | MTSAFE
10 |
11 | EXTRA_DIST = getopt.c getopt1.c
12 |
13 | lib_moptions = {
14 | NOINST
15 | NAME = moptions
16 | SOURCES = monet_options.c monet_options.h monet_getopt.h
17 | }
18 |
19 | headers_h = {
20 | DIR = includedir/monetdb
21 | HEADERS = h
22 | SOURCES = monet_options.h
23 | }
24 |
--------------------------------------------------------------------------------
/common/stream/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | ## Process this file with automake to produce Makefile.in
8 |
9 | MTSAFE
10 |
11 | INCLUDES = $(zlib_CFLAGS) \
12 | $(BZ_CFLAGS) \
13 | $(openssl_CFLAGS) \
14 | $(curl_CFLAGS)
15 |
16 | lib_stream = {
17 | SOURCES = stream.c stream.h stream_socket.h
18 | VERSION = $(STREAM_VERSION)
19 | LIBS = $(SOCKET_LIBS) \
20 | $(zlib_LIBS) \
21 | $(BZ_LIBS) \
22 | $(openssl_LIBS) \
23 | $(curl_LIBS) \
24 | $(LTLIBICONV)
25 | }
26 |
27 | headers_common = {
28 | DIR = includedir/monetdb
29 | HEADERS = h
30 | SOURCES = stream_socket.h stream.h
31 | }
32 |
33 | headers_pc = {
34 | COND = NOT_WIN32
35 | HEADERS = pc
36 | DIR = libdir/pkgconfig
37 | SOURCES = monetdb-stream.pc.in
38 | }
39 |
--------------------------------------------------------------------------------
/common/stream/monetdb-stream.pc:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | prefix=/home/kkara/Projects/MyMonetDB
8 | exec_prefix=${prefix}
9 | libdir=${exec_prefix}/lib
10 | includedir=${prefix}/include
11 |
12 | Name: monetdb-stream
13 | Description: MonetDB streams libary
14 | Version: 11.21.19
15 | Requires: zlib
16 |
17 | Libs: -L${libdir} -lstream
18 | Cflags: -I${includedir}/monetdb
19 |
--------------------------------------------------------------------------------
/common/stream/monetdb-stream.pc.in:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | prefix=@prefix@
8 | exec_prefix=@exec_prefix@
9 | libdir=@libdir@
10 | includedir=@includedir@
11 |
12 | Name: monetdb-stream
13 | Description: MonetDB streams libary
14 | Version: @PACKAGE_VERSION@
15 | Requires: @PKG_CURL@ @PKG_ZLIB@
16 |
17 | Libs: -L${libdir} -lstream @SOCKET_LIBS@
18 | Cflags: -I${includedir}/monetdb
19 |
--------------------------------------------------------------------------------
/common/utils/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | ## Process this file with automake to produce Makefile.in
8 |
9 | MTSAFE
10 |
11 | INCLUDES = $(openssl_CFLAGS)
12 |
13 | lib_mutils = {
14 | NOINST
15 | SOURCES = mutils.h mutils.c prompt.c mprompt.h
16 | }
17 |
18 | lib_mcrypt = {
19 | NOINST
20 | SOURCES = mcrypt.h mcrypt.c
21 | }
22 |
23 | lib_muuid = {
24 | NOINST
25 | SOURCES = muuid.h muuid.c
26 | }
27 |
28 | lib_msabaoth = {
29 | NOINST
30 | SOURCES = msabaoth.h msabaoth.c
31 | }
32 |
33 | EXTRA_DIST = s_nextafterf.c math_private.h strptime.c
34 |
--------------------------------------------------------------------------------
/common/utils/mcrypt.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _SEEN_MCRYPT_H
10 | #define _SEEN_MCRYPT_H 1
11 |
12 | char *mcrypt_getHashAlgorithms(void);
13 | char *mcrypt_MD5Sum(const char *string, size_t len);
14 | char *mcrypt_SHA1Sum(const char *string, size_t len);
15 | char *mcrypt_SHA224Sum(const char *string, size_t len);
16 | char *mcrypt_SHA256Sum(const char *string, size_t len);
17 | char *mcrypt_SHA384Sum(const char *string, size_t len);
18 | char *mcrypt_SHA512Sum(const char *string, size_t len);
19 | char *mcrypt_RIPEMD160Sum(const char *string, size_t len);
20 | char *mcrypt_BackendSum(const char *string, size_t len);
21 | char *mcrypt_hashPassword(const char *algo, const char *password, const char *challenge);
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/common/utils/mprompt.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | extern char *prompt_getlogin(void);
10 | extern char *simple_prompt(const char *prompt, int maxlen, int echo, const char *def);
11 |
--------------------------------------------------------------------------------
/common/utils/muuid.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _SEEN_MUUID_H
10 | #define _SEEN_MUUID_H 1
11 |
12 | char *generateUUID(void);
13 |
14 | #endif
15 |
16 | /* vim:set ts=4 sw=4 noexpandtab: */
17 |
--------------------------------------------------------------------------------
/debian/compat:
--------------------------------------------------------------------------------
1 | 5
2 |
--------------------------------------------------------------------------------
/debian/copyright:
--------------------------------------------------------------------------------
1 | This Source Code Form is subject to the terms of the Mozilla Public
2 | License, v. 2.0. If a copy of the MPL was not distributed with this
3 | file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
--------------------------------------------------------------------------------
/debian/libmonetdb-client-dev.install:
--------------------------------------------------------------------------------
1 | debian/tmp/usr/lib/libmapi.so usr/lib
2 | debian/tmp/usr/include/monetdb/mapi.h usr/include/monetdb
3 | debian/tmp/usr/lib/pkgconfig/monetdb-mapi.pc usr/lib/pkgconfig
4 |
--------------------------------------------------------------------------------
/debian/libmonetdb-client-odbc.install:
--------------------------------------------------------------------------------
1 | debian/tmp/usr/lib/libMonetODBC.so usr/lib
2 | debian/tmp/usr/lib/libMonetODBCs.so usr/lib
3 |
--------------------------------------------------------------------------------
/debian/libmonetdb-client-odbc.postinst:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 |
3 | # This Source Code Form is subject to the terms of the Mozilla Public
4 | # License, v. 2.0. If a copy of the MPL was not distributed with this
5 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 | #
7 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
8 |
9 | set -e
10 |
11 | if [ "$1" = configure ]; then
12 | # install driver if first install of package or if driver not installed yet
13 | if [ -z "$2" ] || ! odbcinst -d -q -n MonetDB &> /dev/null; then
14 | odbcinst -i -d -r <&2
24 | exit 1
25 | ;;
26 | esac
27 |
28 | # dh_installdeb will replace this with shell code automatically
29 | # generated by other debhelper scripts.
30 |
31 | #DEBHELPER#
32 |
33 | exit 0
34 |
35 |
36 |
--------------------------------------------------------------------------------
/debian/perl-monetdb-client.install:
--------------------------------------------------------------------------------
1 | debian/tmp/usr/lib/perl5/* usr/lib/perl5
2 |
--------------------------------------------------------------------------------
/debian/php5-monetdb-client.install:
--------------------------------------------------------------------------------
1 | debian/tmp/usr/share/php/monetdb/* usr/share/php/monetdb
2 |
--------------------------------------------------------------------------------
/debian/python-monetdb.install:
--------------------------------------------------------------------------------
1 | # usr/lib/python2.*/*-packages/* EXCEPT: MonetDBtesting
2 | debian/tmp/usr/lib/python2.*/*-packages/monetdb/*
3 | debian/tmp/usr/lib/python2.*/*-packages/python_monetdb-*.egg-info
4 |
--------------------------------------------------------------------------------
/debian/python3-monetdb.install:
--------------------------------------------------------------------------------
1 | # usr/lib/python3.*/*-packages/* EXCEPT: MonetDBtesting
2 | debian/tmp/usr/lib/python3/*-packages/monetdb/*
3 | debian/tmp/usr/lib/python3/*-packages/python_monetdb-*.egg-info
4 |
--------------------------------------------------------------------------------
/debian/ruby-monetdb-client.install:
--------------------------------------------------------------------------------
1 | debian/tmp/usr/lib/ruby/* /usr/lib/ruby
2 |
--------------------------------------------------------------------------------
/debian/source/format:
--------------------------------------------------------------------------------
1 | 3.0 (native)
2 |
--------------------------------------------------------------------------------
/fpga/README:
--------------------------------------------------------------------------------
1 | Makefile using sources from Centaur
2 | =========================================
3 | Set path of you Centaur git directory:
4 |
5 | export CENTAUR_HOME=~/workspace/centaur
6 |
--------------------------------------------------------------------------------
/fpga/fpga.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 2016 - 2017 Systems Group, ETH Zurich
7 | */
8 | #ifndef FILE_FPGAH_INCLUDED
9 | #define FILE_FPGAH_INCLUDED
10 |
11 | #include "fpga_udf.h"
12 |
13 |
14 | #ifdef __cplusplus
15 | extern "C" {
16 | #endif
17 |
18 |
19 | extern void* FPGAmalloc(size_t);
20 | extern void* FPGAmallocmax(size_t, size_t*, int);
21 | extern void* FPGAreallocmax(void*, size_t, size_t*, int);
22 | extern void FPGAfree(void*);
23 |
24 | //TODO make not extern
25 | extern void fpga_init();
26 |
27 |
28 | #ifdef __cplusplus
29 | }
30 | #endif
31 |
32 |
33 | #endif /* !FILE_FPGA_INCLUDED */
34 |
--------------------------------------------------------------------------------
/fpga/fpga.hpp:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 2016 - 2017 Systems Group, ETH Zurich
7 | */
8 | #ifndef FILE_FPGA_HPP_INCLUDED
9 | #define FILE_FPGA_HPP_INCLUDED
10 |
11 |
12 | #include "operators/hwoperators.h"
13 | #include "fpga_udf.h"
14 |
15 | static FPGA * my_fpga;
16 | static pthread_mutex_t fpga_mutex;
17 | static int* use_sw;
18 |
19 | struct datapoint {
20 | struct datapoint *next;
21 | uint64_t timestamp;
22 | uint32_t dimensions[16];
23 | };
24 |
25 | #define FALSE 0
26 | #define TRUE 1
27 | #define BOOL uint32_t
28 | #endif /* !FILE_FPGA_INCLUDED */
29 |
--------------------------------------------------------------------------------
/fpga/operators/regex/rtl/nlb_cfg_pkg.vh:
--------------------------------------------------------------------------------
1 | `ifndef NLB_CFG_PKG_VH
2 | `define NLB_CFG_PKG_VH
3 | `define VENDOR_ALTERA
4 | `define TOOL_QUARTUS
5 | `include "vendor_defines.vh"
6 | `endif
7 |
--------------------------------------------------------------------------------
/fpga/operators/regex/sw/regex-util/fregex.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 2016 - 2017 Systems Group, ETH Zurich
7 | */
8 | #ifndef F_REGEX
9 | #define F_REGEX
10 |
11 | #define MAX_CHARS 128
12 | #define MAX_STATES 32
13 |
14 | #ifndef DEBUG
15 | #define DEBUG true
16 | #endif
17 |
18 | #define bool short
19 | #define true 1
20 | #define false 0
21 |
22 | #define SUPPORTS_CASE_INSENSITIVE false
23 |
24 | int fregex_get_config(const char* regex_string, int char_cnt, int state_cnt, unsigned char* config_data, int* config_len);
25 |
26 | #endif
27 |
--------------------------------------------------------------------------------
/gdk/gdk_imprints.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef GDK_IMPS_H
10 | #define GDK_IMPS_H
11 |
12 | /*
13 | * the cache dictionary struct
14 | */
15 | typedef struct {
16 | unsigned int cnt:24, /* cnt of pages <= IMPS_MAX_CNT */
17 | repeat:1, /* repeat flag */
18 | flags:7; /* reserved flags for future */
19 | } cchdc_t;
20 |
21 | /* hard bounds */
22 | #define IMPS_MAX_CNT ((1 << 24) - 1) /* 24 one bits */
23 | #define IMPS_PAGE 64
24 |
25 | /* auxiliary macros */
26 | #define IMPSsetBit(B, X, Y) ((X) | ((uint##B##_t) 1 << (Y)))
27 | #define IMPSunsetBit(B, X, Y) ((X) & ~((uint##B##_t) 1 << (Y)))
28 | #define IMPSisSet(B, X, Y) (((X) & ((uint##B##_t) 1 << (Y))) != 0)
29 |
30 | #endif /* GDK_IMPS_H */
31 |
--------------------------------------------------------------------------------
/gdk/gdk_mapreduce.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _GDK_MAPREDUCE_H_
10 | #define _GDK_MAPREDUCE_H_
11 |
12 | gdk_export void MRschedule(int taskcnt, void **arg, void (*cmd) (void *p));
13 |
14 | #endif /* _GDK_MAPREDUCE_H_ */
15 |
--------------------------------------------------------------------------------
/gdk/gdk_storage.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _GDK_STORAGE_H_
10 | #define _GDK_STORAGE_H_
11 |
12 | extern void DESCclean(BAT *);
13 | extern int DESCsetmodes(BAT *b);
14 |
15 | #endif /* _GDK_STORAGE_H_ */
16 |
--------------------------------------------------------------------------------
/gdk/gdk_system_private.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | /* This file should not be included in any file outside of this directory */
10 |
11 | #ifndef LIBGDK
12 | #error this file should not be included outside its source directory
13 | #endif
14 |
15 | __declspec(noreturn) void MT_exit_thread(int status)
16 | __attribute__((__noreturn__));
17 | __hidden void MT_global_exit(int status)
18 | __attribute__((__noreturn__))
19 | __attribute__((__visibility__("hidden")));
20 | __hidden int MT_kill_thread(MT_Id t)
21 | __attribute__((__visibility__("hidden")));
22 |
--------------------------------------------------------------------------------
/gdk/gdk_tm.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _GDK_TM_H_
10 | #define _GDK_TM_H_
11 |
12 | #define SYSTRANSACTION "tmp"
13 | #define MAXTM 10
14 |
15 | #endif /* _GDK_TM_H_ */
16 |
--------------------------------------------------------------------------------
/gdk/libbat.rc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fpgasystems/doppiodb/a6668192b90d4372303c2b79eeff97eb8089792b/gdk/libbat.rc
--------------------------------------------------------------------------------
/gdk/monetdb-gdk.pc:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | prefix=/home/kkara/Projects/MyMonetDB
8 | exec_prefix=${prefix}
9 | libdir=${exec_prefix}/lib
10 | includedir=${prefix}/include
11 |
12 | Name: monetdb-gdk
13 | Description: MonetDB GDK libary
14 | Version: 11.21.19
15 |
16 | Libs: -L${libdir} -lbat
17 | Cflags: -I${includedir}/monetdb
18 |
--------------------------------------------------------------------------------
/gdk/monetdb-gdk.pc.in:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | prefix=@prefix@
8 | exec_prefix=@exec_prefix@
9 | libdir=@libdir@
10 | includedir=@includedir@
11 |
12 | Name: monetdb-gdk
13 | Description: MonetDB GDK libary
14 | Version: @PACKAGE_VERSION@
15 |
16 | Libs: -L${libdir} -lbat
17 | Cflags: -I${includedir}/monetdb
18 |
--------------------------------------------------------------------------------
/geom/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | SUBDIRS = lib HAVE_MONETDB5?monetdb5 sql
8 |
9 | EXTRA_DIST_DIR = BugTracker
10 |
--------------------------------------------------------------------------------
/geom/lib/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | MTSAFE
8 | INCLUDES = ../../common/options ../../common/stream ../../gdk $(GEOS_INCS)
9 |
10 | lib_geom = {
11 | NOINST
12 | DIR = libdir/MonetDB
13 | SOURCES = libgeom.c libgeom.h
14 | }
15 |
--------------------------------------------------------------------------------
/geom/monetdb5/30_geom.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | # This loads the MonetDB/GIS module
8 | include geom;
9 |
--------------------------------------------------------------------------------
/geom/sql/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | headers_sql = {
8 | HEADERS = sql
9 | DIR = libdir/monetdb5/createdb
10 | SOURCES = 40_geom.sql
11 | }
12 |
13 | EXTRA_DIST_DIR = Tests
14 |
--------------------------------------------------------------------------------
/java/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | SUBDIRS = HAVE_JAVAJDBC?tests
8 |
9 | EXTRA_DIST = build.xml build.properties release.txt
10 |
11 | EXTRA_DIST_DIR = src \
12 | example
13 |
14 | JAVA_HOME = @JAVA_HOME@
15 |
16 | ant_distjdbc = {
17 | COND = HAVE_JAVAJDBC
18 | DIR = datadir/monetdb/lib
19 | FILES = monetdb-mcl-1.13.jar monetdb-jdbc-2.19.jar jdbcclient.jar
20 | }
21 |
22 | ant_distmerocontrol = {
23 | COND = HAVE_JAVAMEROCONTROL
24 | DIR = datadir/monetdb/lib
25 | FILES = merocontrol.jar
26 | }
27 |
28 | # vim: ft=automake :
29 |
--------------------------------------------------------------------------------
/java/build.properties:
--------------------------------------------------------------------------------
1 | # Default build parameters. These may be overridden by local configuration
2 | # settings in build.local.properties.
3 |
4 |
5 | ##
6 | ## MCL
7 | ##
8 |
9 | # major release number
10 | MCL_MAJOR=1
11 | # minor release number
12 | MCL_MINOR=13
13 |
14 |
15 | ##
16 | ## JDBC (and client)
17 | ##
18 |
19 | # major release number
20 | JDBC_MAJOR=2
21 | # minor release number
22 | JDBC_MINOR=19
23 | # an additional identifying string
24 | JDBC_VER_SUFFIX=Liberica
25 | # the default port to connect on, if no port given when using SQL
26 | JDBC_DEF_PORT=50000
27 |
28 |
29 | ##
30 | ## General
31 | ##
32 |
33 | # should we compile with debugging symbols
34 | enable_debug=true
35 | # should we optimize the build, preferably not for debugging
36 | enable_optimize=false
37 |
--------------------------------------------------------------------------------
/java/distjdbc/META-INF/services/java.sql.Driver:
--------------------------------------------------------------------------------
1 | nl.cwi.monetdb.jdbc.MonetDriver
--------------------------------------------------------------------------------
/java/src/main/java/nl/cwi/monetdb/mcl/MCLException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | package nl.cwi.monetdb.mcl;
10 |
11 | /**
12 | * A general purpose Exception class for MCL related problems. This
13 | * class should be used if no more precise Exception class exists.
14 | */
15 | public class MCLException extends Exception {
16 | /**
17 | *
18 | */
19 | private static final long serialVersionUID = 1L;
20 |
21 | public MCLException(String e) {
22 | super(e);
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/java/src/main/java/nl/cwi/monetdb/merovingian/MerovingianException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | package nl.cwi.monetdb.merovingian;
10 |
11 | /**
12 | * An Exception raised when monetdbd specific problems occur.
13 | *
14 | * This class is a shallow wrapper around Exception to identify an
15 | * exception as one originating from the monetdbd instance being
16 | * communicated with, instead of a locally generated one.
17 | *
18 | * @author Fabian Groffen
19 | * @version 1.0
20 | */
21 | public class MerovingianException extends Exception {
22 | public MerovingianException(String reason) {
23 | super(reason);
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/java/src/main/java/nl/cwi/monetdb/util/OptionsException.java:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | package nl.cwi.monetdb.util;
10 |
11 | public class OptionsException extends Exception {
12 | public OptionsException(String reason) {
13 | super(reason);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/java/tests/build.properties:
--------------------------------------------------------------------------------
1 | # add a line like this to your build.local.properties to enable
2 | # debugging:
3 | #debug=&debug=true
4 |
5 | # by default debugging is disabled
6 | debug=
7 |
8 | # one can override the connection url as well
9 | #jdbc_url=jdbc:monetdb://localhost:53210/one?user=monetdb&password=monetdb
10 |
--------------------------------------------------------------------------------
/java/tests/jar_jdbctests/META-INF/services/java.sql.Driver:
--------------------------------------------------------------------------------
1 | nl.cwi.monetdb.jdbc.MonetDriver
--------------------------------------------------------------------------------
/license.txt:
--------------------------------------------------------------------------------
1 | This Source Code Form is subject to the terms of the Mozilla Public
2 | License, v. 2.0. If a copy of the MPL was not distributed with this
3 | file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 |
5 | Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
--------------------------------------------------------------------------------
/monetdb5/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | # mal, modules, optimizer, scheduler: the main libmonetdb5 body
8 | # tools: builds libmonetdb5 from mal, modules, optimizer, scheduler
9 | # extras: builds optional/separate libraries that require libmonetdb5
10 | SUBDIRS = mal modules optimizer scheduler tools extras NATIVE_WIN32?NT
11 |
12 | EXTRA_DIST_DIR = tests
13 |
--------------------------------------------------------------------------------
/monetdb5/NT/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | scripts_bat = {
8 | EXT = bat
9 | DIR = prefix
10 | SOURCES = M5server.bat
11 | }
12 |
--------------------------------------------------------------------------------
/monetdb5/extras/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | SUBDIRS = HAVE_SPHINXCLIENT?sphinx mal_optimizer_template HAVE_LIBR?rapi
8 |
9 |
--------------------------------------------------------------------------------
/monetdb5/extras/mal_optimizer_template/91_opt_sql_append.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | # This loads the opt_sql_append optimizer module
8 | include opt_sql_append;
9 |
--------------------------------------------------------------------------------
/monetdb5/extras/mal_optimizer_template/opt_sql_append.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _OPT_SQL_APPEND_
10 | #define _OPT_SQL_APPEND_
11 |
12 | #ifdef WIN32
13 | #ifndef LIBOPT_SQL_APPEND
14 | #define opt_sql_append_export extern __declspec(dllimport)
15 | #else
16 | #define opt_sql_append_export extern __declspec(dllexport)
17 | #endif
18 | #else
19 | #define opt_sql_append_export extern
20 | #endif
21 |
22 | #include "opt_prelude.h"
23 |
24 | opt_sql_append_export str OPTsql_append(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p);
25 |
26 | #define DEBUG_OPT_SQL_APPEND 61
27 | #define OPTDEBUGsql_append if (optDebug & ((lng)1 << DEBUG_OPT_SQL_APPEND))
28 |
29 | #endif /* _OPT_SQL_APPEND_ */
30 |
--------------------------------------------------------------------------------
/monetdb5/extras/mal_optimizer_template/opt_sql_append.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | pattern optimizer.sql_append():str
8 | address OPTsql_append
9 | comment "Avoid extra BAT copy with sql.append() whenever possible.";
10 |
11 | pattern optimizer.sql_append(mod:str, fcn:str):str
12 | address OPTsql_append
13 | comment "Avoid extra BAT copy with sql.append() whenever possible.";
14 |
--------------------------------------------------------------------------------
/monetdb5/extras/rapi/50_rapi.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | # This loads the MonetDB/RAPI module
8 | include rapi;
9 |
--------------------------------------------------------------------------------
/monetdb5/extras/sphinx/30_sphinx.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | include sphinx;
8 |
--------------------------------------------------------------------------------
/monetdb5/extras/sphinx/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | INCLUDES = ../../mal \
8 | ../../../common/options \
9 | ../../../common/stream \
10 | ../../../gdk \
11 | $(SPHINXCLIENT_CFLAGS)
12 |
13 | lib__sphinx = {
14 | MODULE
15 | DIR = libdir/monetdb5
16 | SOURCES = sphinx.c sphinx.h
17 |
18 | LIBS = ../../tools/libmonetdb5 $(SPHINXCLIENT_LIBS)
19 | }
20 |
21 | headers_sphinx_mal = {
22 | HEADERS = mal
23 | DIR = libdir/monetdb5
24 | SOURCES = sphinx.mal
25 | }
26 |
27 | headers_autoload = {
28 | HEADERS = mal
29 | DIR = libdir/monetdb5/autoload
30 | SOURCES = 30_sphinx.mal
31 | }
32 |
33 | EXTRA_DIST = sphinx.mal 30_sphinx.mal
34 |
--------------------------------------------------------------------------------
/monetdb5/extras/sphinx/sphinx.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef SPHINX_H
10 | #define SPHINX_H
11 |
12 | #include
13 | #include
14 | #include
15 | #include "mal_client.h"
16 | #include "mal_interpreter.h"
17 |
18 | #ifdef WIN32
19 | #ifndef LIBSPHINX
20 | #define sphinx_export extern __declspec(dllimport)
21 | #else
22 | #define sphinx_export extern __declspec(dllexport)
23 | #endif
24 | #else
25 | #define sphinx_export extern
26 | #endif
27 |
28 | sphinx_export str SPHINXsearchIndexLimit(bat *ret, const str *query, const str *index, const int *limit);
29 |
30 | #endif /* SPHINX_H */
31 |
32 |
--------------------------------------------------------------------------------
/monetdb5/mal/mal_atom.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _MAL_ATOM_H
10 | #define _MAL_ATOM_H
11 |
12 | /* #define MAL_ATOM_DEBUG */
13 |
14 | mal_export int malAtomSize(int size, int align, char *name);
15 |
16 | #endif /* _MAL_ATOM_H*/
17 |
--------------------------------------------------------------------------------
/monetdb5/mal/mal_dataflow.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _MAL_DATAFLOW_H
10 | #define _MAL_DATAFLOW_H
11 |
12 | #include "mal.h"
13 | #include "mal_client.h"
14 |
15 | mal_export str runMALdataflow(Client cntxt, MalBlkPtr mb, int startpc, int stoppc, MalStkPtr stk);
16 |
17 | #endif /* _MAL_DATAFLOW_H*/
18 |
--------------------------------------------------------------------------------
/monetdb5/mal/mal_factory.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _MAL_FACTORY_H
10 | #define _MAL_FACTORY_H
11 |
12 | /* #define DEBUG_MAL_FACTORY */
13 |
14 | #include "mal.h"
15 | #include "mal_client.h"
16 |
17 | mal_export str shutdownFactory(Client cntxt, MalBlkPtr mb);
18 | mal_export str shutdownFactoryByName(Client cntxt, Module m,str nme);
19 | #endif /* _MAL_FACTORY_H */
20 |
--------------------------------------------------------------------------------
/monetdb5/mal/mal_http_daemon.c:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | /* (author) A. de Rijke
10 | * For documentation see website
11 | */
12 |
13 | #include "monetdb_config.h"
14 |
15 | #include "mal.h"
16 | #include "mal_exception.h"
17 | #include "mal_private.h"
18 | #include "mal_http_daemon.h"
19 |
20 | /* dummy noop functions to implement the exported API, if these had been
21 | * defined to return a str, we could have informed the caller no
22 | * implementation was available */
23 |
24 | void
25 | register_http_handler(http_request_handler handler)
26 | {
27 | (void)handler;
28 | }
29 |
30 | void
31 | startHttpdaemon(void)
32 | {
33 | }
34 |
35 | void
36 | stopHttpdaemon(void)
37 | {
38 | }
39 |
--------------------------------------------------------------------------------
/monetdb5/mal/mal_http_daemon.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _MAL_HTTP_DAEMON_H_
10 | #define _MAL_HTTP_DAEMON_H_
11 | #include "mal.h"
12 |
13 | typedef int (*http_request_handler)
14 | (const char *url, const char *method, char **page, const char *);
15 |
16 | mal_export void register_http_handler(http_request_handler handler);
17 |
18 | #endif
19 |
--------------------------------------------------------------------------------
/monetdb5/mal/mal_import.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _MAL_IMPORT_H
10 | #define _MAL_IMPORT_H
11 |
12 | #include "mal_exception.h"
13 | #include "mal_client.h"
14 | #include "mal_session.h"
15 | #include "mal_utils.h"
16 |
17 | mal_export void slash_2_dir_sep(str fname);
18 | mal_export str evalFile(Client c, str fname, int listing);
19 | mal_export str compileString(Symbol *fcn, Client c, str s);
20 | mal_export int callString(Client c, str s, int listing);
21 | #endif /* _MAL_IMPORT_H */
22 |
--------------------------------------------------------------------------------
/monetdb5/mal/mal_namespace.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _MAL_NAMESPACE_H
10 | #define _MAL_NAMESPACE_H
11 |
12 | mal_export void initNamespace(void);
13 | mal_export void finishNamespace(void);
14 | mal_export str putName(const char *nme, size_t len);
15 | mal_export str getName(const char *nme, size_t len);
16 | mal_export void delName(const char *nme, size_t len);
17 |
18 | #define MAXIDENTLEN 1024
19 |
20 | #endif /* _MAL_NAMESPACE_H */
21 |
--------------------------------------------------------------------------------
/monetdb5/mal/mal_parser.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _MAL_PARSER_H
10 | #define _MAL_PARSER_H
11 |
12 | #include "mal_import.h"
13 |
14 | #define MAXERRORS 250
15 |
16 | #define CURRENT(c) (c->fdin->buf + c->fdin->pos + c->yycur)
17 | #define currChar(X) (*CURRENT(X))
18 | #define peekChar(X) (*((X)->fdin->buf + (X)->fdin->pos + (X)->yycur+1))
19 | #define nextChar(X) X->yycur++
20 | #define prevChar(X) if(X->yycur) X->yycur--
21 |
22 | mal_export void initParser(void); /* needed in src/mal/mal.c */
23 | mal_export int parseMAL(Client cntxt, Symbol curPrg, int skipcomments);
24 |
25 | #endif /* _MAL_PARSER_H */
26 |
27 |
--------------------------------------------------------------------------------
/monetdb5/mal/mal_properties.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _MAL_PROPERTIES_
10 | #define _MAL_PROPERTIES_
11 | #include "mal.h"
12 | #include "mal_namespace.h"
13 |
14 | typedef enum prop_op_t {
15 | op_lt = 0,
16 | op_lte = 1,
17 | op_eq = 2,
18 | op_gte = 3,
19 | op_gt = 4,
20 | op_ne = 5
21 | } prop_op_t;
22 |
23 | mal_export sht PropertyIndex(str name);
24 | mal_export str PropertyName(sht idx);
25 | mal_export prop_op_t PropertyOperator( str s );
26 | mal_export str PropertyOperatorString( prop_op_t op );
27 |
28 | #endif
29 |
30 |
--------------------------------------------------------------------------------
/monetdb5/mal/mal_readline.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef READLINETOOLS_H_INCLUDED
10 | #define READLINETOOLS_H_INCLUDED
11 |
12 | #include "mal_client.h"
13 | mal_export int readConsole(Client cntxt);
14 | mal_export char * getConsoleInput(Client c, const char *prompt, int linemode, int exit_on_error);
15 |
16 | #endif /* READLINETOOLS_H_INCLUDED */
17 |
--------------------------------------------------------------------------------
/monetdb5/mal/mal_resource.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _MAL_RESOURCE_H
10 | #define _MAL_RESOURCE_H
11 |
12 | #include "mal_interpreter.h"
13 |
14 | #define TIMESLICE 2000000 /* usec */
15 | #define DELAYUNIT 5 /* ms delay in parallel processing decisions */
16 | #define MAX_DELAYS 1000 /* never wait forever */
17 |
18 | #define USE_MAL_ADMISSION
19 | #ifdef USE_MAL_ADMISSION
20 | mal_export int MALadmission(lng argclaim, lng hotclaim);
21 | #endif
22 |
23 | mal_export lng getMemoryClaim(MalBlkPtr mb, MalStkPtr stk, InstrPtr pci, int i, int flag);
24 | mal_export void MALresourceFairness(lng usec);
25 |
26 | #endif /* _MAL_RESOURCE_H*/
27 |
--------------------------------------------------------------------------------
/monetdb5/mal/mal_utils.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef MAL_UTILS_H
10 | #define MAL_UTILS_H
11 | #include "mal.h"
12 |
13 | mal_export str mal_quote(const char *msg, size_t size);
14 | mal_export void mal_unquote(char *msg);
15 |
16 | #endif /* MAL_UTILS_H */
17 |
--------------------------------------------------------------------------------
/monetdb5/modules/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | SUBDIRS = atoms kernel mal
8 |
--------------------------------------------------------------------------------
/monetdb5/modules/atoms/00_json_hge.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | command filter(name:json, idx:hge) :json
8 | address JSONfilterArray_hge;
9 | command filter(name:json, idx:hge, other:str) :json
10 | address JSONfilterArrayDefault_hge;
11 |
--------------------------------------------------------------------------------
/monetdb5/modules/atoms/batxml.sql:
--------------------------------------------------------------------------------
1 | -- This Source Code Form is subject to the terms of the Mozilla Public
2 | -- License, v. 2.0. If a copy of the MPL was not distributed with this
3 | -- file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | --
5 | -- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | CREATE AGGREGATE "xmlagg"( x xml ) RETURNS xml external name xml.agg;
8 |
--------------------------------------------------------------------------------
/monetdb5/modules/atoms/identifier.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | atom identifier:str;
8 |
9 | command fromstr()
10 | address IDfromString
11 | comment "Convert a string to an identifier without any check";
12 |
13 | command tostr()
14 | address IDtoString
15 | comment "Convert identifier to string equivalent";
16 |
17 | command identifier(s:str):identifier
18 | address IDentifier
19 | comment "Cast a string to an identifer ";
20 |
21 | command prelude():void
22 | address IDprelude
23 | comment "Initialize the module";
24 |
25 | identifier.prelude();
26 |
27 |
--------------------------------------------------------------------------------
/monetdb5/modules/atoms/mcurl.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | module mcurl;
8 |
9 | command getrequest(s:str):str
10 | address CURLgetRequest
11 | comment "Perform a http get request";
12 |
13 | command putrequest(s:str):str
14 | address CURLputRequest
15 | comment "Perform a http put request";
16 |
17 | command postrequest(s:str):str
18 | address CURLpostRequest
19 | comment "Perform a http post request";
20 |
21 | command deleterequest(s:str):str
22 | address CURLdeleteRequest
23 | comment "Perform a http delete request";
24 |
--------------------------------------------------------------------------------
/monetdb5/modules/kernel/logger.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | module logger;
8 |
9 | atom logger = ptr;
10 | end;
11 | command create( debug:int, fn:str, dirname:str, version:int ):logger
12 | address logger_create_wrap
13 | comment "Create logger, check if recovery is needed. The fn variable names the frontend,this is needed to keep the catalog bat seperate";
14 |
15 | command destroy( l:logger ) :void
16 | address logger_destroy_wrap
17 | comment "Free the resources used by the logger.";
18 |
19 |
--------------------------------------------------------------------------------
/monetdb5/modules/mal/00_batExtensions_hge.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | command bat.imprints(b:bat[:oid,:hge])
8 | address CMDBATimprints;
9 |
10 | command bat.imprintsize(b:bat[:oid,:hge]):lng
11 | address CMDBATimprintsize;
12 |
13 |
--------------------------------------------------------------------------------
/monetdb5/modules/mal/00_cluster_hge.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | module cluster;
8 |
9 | command new(b:bat[:oid,:hge], bits:int, offset:int) (psum:bat[:oid,:wrd], map:bat[:oid,:wrd])
10 | address CLS_create_hge;
11 |
12 | command new(b:bat[:oid,:hge], bits:int, offset:int, order:bit) (psum:bat[:oid,:wrd], map:bat[:oid,:bte])
13 | address CLS_create2_hge;
14 |
--------------------------------------------------------------------------------
/monetdb5/modules/mal/00_iterator_hge.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | module iterator;
8 |
9 | command next(step:hge,last:hge):hge
10 | address ITRnext_hge;
11 |
--------------------------------------------------------------------------------
/monetdb5/modules/mal/00_language_hge.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | module language;
8 |
9 | command assert(v:hge,term:str):void
10 | address MALassertHge;
11 |
--------------------------------------------------------------------------------
/monetdb5/modules/mal/00_mal_mapi_hge.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | module mapi;
8 |
9 | command fetch_field(hdl:int,fnr:int):hge
10 | address SERVERfetch_field_hge
11 | comment "Retrieve a single hge field.";
12 |
--------------------------------------------------------------------------------
/monetdb5/modules/mal/00_mkey_hge.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | module mkey;
8 |
9 | pattern hash(v:hge):wrd
10 | address MKEYhash
11 | comment "calculate a hash value";
12 |
--------------------------------------------------------------------------------
/monetdb5/modules/mal/groupby.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _GROUPBY_H
10 | #define _GROUPBY_H
11 |
12 | //#define _DEBUG_GROUPBY_
13 |
14 | #include "mal.h"
15 | #include "mal_interpreter.h"
16 |
17 | #ifdef WIN32
18 | #if !defined(LIBMAL) && !defined(LIBATOMS) && !defined(LIBKERNEL) && !defined(LIBMAL) && !defined(LIBOPTIMIZER) && !defined(LIBSCHEDULER) && !defined(LIBMONETDB5)
19 | #define group_by_export extern __declspec(dllimport)
20 | #else
21 | #define group_by_export extern __declspec(dllexport)
22 | #endif
23 | #else
24 | #define group_by_export extern
25 | #endif
26 |
27 | group_by_export str GROUPmulticolumngroup(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
28 |
29 | #endif /* _GROUPBY_H */
30 |
--------------------------------------------------------------------------------
/monetdb5/modules/mal/groupby.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | module group;
8 |
9 | pattern group.multicolumn(b:bat[:oid,:any]...)(ref:bat[:oid,:oid], grp:bat[:oid,:oid], hist:bat[:oid,:any])
10 | address GROUPmulticolumngroup
11 | comment "Derivation of a group index over multiple columns.";
12 |
--------------------------------------------------------------------------------
/monetdb5/modules/mal/joinpath.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _OPT_JOINPATH_
10 | #define _OPT_JOINPATH_
11 |
12 | #include "mal_client.h"
13 | #include "mal_interpreter.h"
14 |
15 | #ifdef WIN32
16 | #if !defined(LIBMAL) && !defined(LIBATOMS) && !defined(LIBKERNEL) && !defined(LIBMAL) && !defined(LIBOPTIMIZER) && !defined(LIBSCHEDULER) && !defined(LIBMONETDB5)
17 | #define join_export extern __declspec(dllimport)
18 | #else
19 | #define join_export extern __declspec(dllexport)
20 | #endif
21 | #else
22 | #define join_export extern
23 | #endif
24 |
25 | join_export str ALGjoinPath(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
26 |
27 | #endif
28 |
--------------------------------------------------------------------------------
/monetdb5/modules/mal/json_util.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | /*
10 | * (c) Martin Kersten
11 | */
12 |
13 | #ifndef _JSON_H_
14 | #define _JSON_H_
15 |
16 | /* #define _DEBUG_JSON_ */
17 |
18 | #ifdef WIN32
19 | #if !defined(LIBMAL) && !defined(LIBATOMS) && !defined(LIBKERNEL) && !defined(LIBMAL) && !defined(LIBOPTIMIZER) && !defined(LIBSCHEDULER) && !defined(LIBMONETDB5)
20 | #define jsonutil_export extern __declspec(dllimport)
21 | #else
22 | #define jsonutil_export extern __declspec(dllexport)
23 | #endif
24 | #else
25 | #define jsonutil_export extern
26 | #endif
27 |
28 | #include "json.h"
29 |
30 | jsonutil_export str
31 | JSONresultSet(json *res,bat *u, bat *rev, bat *js);
32 |
33 | #endif
34 |
--------------------------------------------------------------------------------
/monetdb5/modules/mal/json_util.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | #
8 | # (c) Martin Kersten
9 |
10 | module json;
11 |
12 | command resultSet(u:bat[:oid,:uuid],rev:bat[:oid,:lng],js:bat[:oid,:json]):json
13 | address JSONresultSet
14 | comment "Converts the json store into a single json string:";
15 |
16 |
--------------------------------------------------------------------------------
/monetdb5/modules/mal/manifold.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | module mal;
8 | module batmal;
9 |
10 | pattern mal.multiplex(mod:str,fcn:str,a:any...):any...
11 | address MANIFOLDremapMultiplex;
12 |
13 | pattern batmal.multiplex(mod:str,fcn:str,a:any...):any...
14 | address MANIFOLDremapMultiplex;
15 |
16 | pattern mal.manifold(mod:str,fcn:str, a:any...):bat[:oid,:any]
17 | address MANIFOLDevaluate;
18 |
--------------------------------------------------------------------------------
/monetdb5/modules/mal/sample.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | #
8 | # @a Lefteris Sidirourgos
9 | # @d 30/08/2011
10 | # @+ The sampling facilities
11 | #
12 |
13 | module sample;
14 |
15 | command subuniform(b:bat[:oid,:any],s:wrd):bat[:oid,:oid]
16 | address SAMPLEuniform
17 | comment "Returns the oids of a uniform sample of size s";
18 |
19 | command subuniform(b:bat[:oid,:any],p:dbl):bat[:oid,:oid]
20 | address SAMPLEuniform_dbl
21 | comment "Returns the oids of a uniform sample of size = (p x count(b)), where 0 <= p <= 1.0";
22 |
--------------------------------------------------------------------------------
/monetdb5/modules/mal/tablet.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | module tablet;
8 | #currently empty
9 |
--------------------------------------------------------------------------------
/monetdb5/optimizer/opt_accumulators.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _OPT_ACCUMULATORS_
10 | #define _OPT_ACCUMULATORS_
11 | #include "opt_prelude.h"
12 | #include "opt_support.h"
13 | #include "mal_interpreter.h"
14 |
15 | opt_export int OPTaccumulatorsImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
16 |
17 | #define OPTDEBUGaccumulators if ( optDebug & ((lng)1 <
14 | #include "mal_interpreter.h"
15 | #include "mal_properties.h"
16 | #include "opt_support.h"
17 | #include "opt_prelude.h"
18 |
19 | opt_export int OPTcostModelImplementation(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
20 |
21 | #define OPTDEBUGcostModel if ( optDebug & ((lng) 1 <vtop;
22 | trimMalVariables(mb,0);
23 | actions = actions - mb->vtop;
24 | return actions;
25 | }
26 |
--------------------------------------------------------------------------------
/monetdb5/optimizer/opt_reduce.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _MAL_REDUCE_
10 | #define _MAL_REDUCE_
11 | #include "opt_prelude.h"
12 | #include "opt_support.h"
13 | #include "mal_instruction.h"
14 |
15 | #define OPTDEBUGreduce if ( optDebug & ((lng)1 <out = b->client->fdout;
17 | b->language = 0;
18 |
19 | b->vtop = 0;
20 | b->q = NULL;
21 | b->mvc_var = 0;
22 | b->output_format = OFMT_CSV;
23 | return b;
24 | }
25 |
26 | backend *
27 | backend_create(mvc *m, Client c)
28 | {
29 | backend *b = MNEW(backend);
30 |
31 | b->console = isAdministrator(c);
32 | b->mvc = m;
33 | b->client = c;
34 | b->mvc_var = 0;
35 | b->output_format = OFMT_CSV;
36 | return backend_reset(b);
37 | }
38 |
39 | void
40 | backend_destroy(backend *b)
41 | {
42 | _DELETE(b);
43 | }
44 |
45 |
--------------------------------------------------------------------------------
/sql/backends/monet5/rel_bin.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _REL_BIN_H_
10 | #define _REL_BIN_H_
11 |
12 | #include "rel_semantic.h"
13 | #include "sql_statement.h"
14 |
15 | extern stmt * exp_bin(mvc *sql, sql_exp *e, stmt *left, stmt *right, stmt *grp, stmt *ext, stmt *cnt, stmt *sel);
16 | extern stmt * rel_bin(mvc *sql, sql_rel *rel);
17 | extern stmt * output_rel_bin(mvc *sql, sql_rel *rel);
18 |
19 | extern stmt * sql_parse(mvc *m, sql_allocator *sa, char *query, char mode);
20 |
21 | #endif /*_REL_BIN_H_*/
22 |
--------------------------------------------------------------------------------
/sql/backends/monet5/sql_assert.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _SQL_ASSERT_H_
10 | #define _SQL_ASSERT_H_
11 | #include "sql.h"
12 |
13 | sql5_export str SQLassert(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
14 | sql5_export str SQLassertInt(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
15 | sql5_export str SQLassertWrd(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
16 | sql5_export str SQLassertLng(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
17 | #ifdef HAVE_HGE
18 | sql5_export str SQLassertHge(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
19 | #endif
20 |
21 | #endif /* _SQL_ASSERT_H_ */
22 |
--------------------------------------------------------------------------------
/sql/backends/monet5/sql_execute.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _SQL_EXECUTE_H_
10 | #define _SQL_EXECUTE_H_
11 | #include "sql.h"
12 |
13 | sql5_export str SQLstatementREST(Client c, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
14 | sql5_export str SQLstatementIntern(Client c, str *expr, str nme, int execute, bit output, res_table **result);
15 | sql5_export str SQLexecutePrepared(Client c, backend *be, cq *q);
16 | sql5_export str SQLengineIntern(Client c, backend *be);
17 | sql5_export str SQLrecompile(Client c, backend *be);
18 |
19 | #endif /* _SQL_EXECUTE_H_ */
20 |
--------------------------------------------------------------------------------
/sql/backends/monet5/sql_inspect.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | function sql_environment{inline}()(name:bat[:oid,:str],value:bat[:oid,:str]);
8 | (name,value):= inspect.getEnvironment();
9 | return (name,value) := (name,value);
10 | end sql_environment;
11 |
--------------------------------------------------------------------------------
/sql/backends/monet5/sql_optimizer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _SQL_OPTIMIZER_H_
10 | #define _SQL_OPTIMIZER_H_
11 | #include "sql.h"
12 |
13 | //#define _SQL_OPTIMIZER_DEBUG
14 |
15 | sql5_export void addQueryToCache(Client c);
16 | sql5_export str SQLoptimizer(Client c);
17 | sql5_export void SQLsetAccessMode(Client c);
18 | sql5_export str getSQLoptimizer(mvc *m);
19 | sql5_export void addOptimizers(Client c, MalBlkPtr mb, char *pipe);
20 |
21 | #endif /* _SQL_OPTIMIZER_H_ */
22 |
--------------------------------------------------------------------------------
/sql/backends/monet5/sql_readline.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef SQL_READLINETOOLS_H_INCLUDED
10 | #define SQL_READLINETOOLS_H_INCLUDED
11 |
12 | #ifdef WIN32
13 | #ifndef LIBSQL
14 | #define sql5_export extern __declspec(dllimport)
15 | #else
16 | #define sql5_export extern __declspec(dllexport)
17 | #endif
18 | #else
19 | #define sql5_export extern
20 | #endif
21 |
22 | #include "mal_client.h"
23 | sql5_export int SQLreadConsole(Client cntxt);
24 |
25 | #endif /* SQL_READLINETOOLS_H_INCLUDED */
26 |
--------------------------------------------------------------------------------
/sql/backends/monet5/sql_statistics.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | /* (co) M.L. Kersten */
10 | #ifndef _SQL_STATISTICS_DEF
11 | #define _SQL_STATISTICS_DEF
12 |
13 | /* #define DEBUG_SQL_STATISTICS */
14 |
15 | #include "sql.h"
16 |
17 | #ifdef WIN32
18 | #ifndef LIBSQL
19 | #define sql5_export extern __declspec(dllimport)
20 | #else
21 | #define sql5_export extern __declspec(dllexport)
22 | #endif
23 | #else
24 | #define sql5_export extern
25 | #endif
26 |
27 | sql5_export str sql_analyze(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
28 |
29 | #endif /* _SQL_STATISTICS_DEF */
30 |
--------------------------------------------------------------------------------
/sql/backends/monet5/sql_upgrades.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _SQL_UPGRADES_H_
10 | #define _SQL_UPGRADES_H_
11 | #include "sql.h"
12 |
13 | sql5_export void SQLupgrades(Client c, mvc *m);
14 |
15 | #endif /* _SQL_UPGRADES_H_ */
16 |
--------------------------------------------------------------------------------
/sql/backends/monet5/sql_user.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _SQL_USER_H_
10 | #define _SQL_USER_H_
11 | #include "sql.h" /* includes sql_backend.h */
12 |
13 | sql5_export void monet5_user_init(backend_functions *be_funcs);
14 | sql5_export str monet5_user_set_def_schema(mvc *m, oid user /* mal user id */);
15 | sql5_export str monet5_user_get_def_schema(mvc *m, int user /* sql user id */);
16 |
17 | sql5_export str db_users_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
18 | sql5_export str db_password_wrap(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
19 |
20 | #endif /* _SQL_USER_H_ */
21 |
--------------------------------------------------------------------------------
/sql/backends/monet5/vaults/70_vault.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | # This loads the MonetDB/SQL module
8 | #include vault;
9 |
--------------------------------------------------------------------------------
/sql/backends/monet5/vaults/72_fits.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | # This loads the MonetDB/SQL module
8 | library fits;
9 | include fits;
10 |
--------------------------------------------------------------------------------
/sql/backends/monet5/vaults/72_fits.sql:
--------------------------------------------------------------------------------
1 |
2 |
3 | create procedure listdir(dirname string) external name fits.listdir;
4 | create procedure fitsattach(fname string) external name fits.attach;
5 | create procedure fitsload(tname string) external name fits.load;
6 | create procedure listdirpat(dirname string,pat string) external name fits.listdirpattern;
7 |
--------------------------------------------------------------------------------
/sql/backends/monet5/vaults/74_netcdf.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | # This loads the MonetDB/SQL module
8 | library netcdf;
9 | include netcdf;
10 |
--------------------------------------------------------------------------------
/sql/backends/monet5/vaults/netcdf.mal:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | module netcdf;
8 |
9 | command test(filename:str) :int
10 | address NCDFtest
11 | comment "Returns number of variables in a given NetCDF dataset (file)";
12 |
13 | pattern attach(filename:str) :void
14 | address NCDFattach
15 | comment "Register a NetCDF file in the vault";
16 |
17 | command importvar(filename:str, varid:int) : str
18 | address NCDFimportVarStmt
19 | comment "Import variable: compose create array string";
20 |
21 | pattern importvariable(fileid:int, varname:str) :void
22 | address NCDFimportVariable
23 | comment "Import variable: create array and load data from variable varname of file fileid";
24 |
25 |
--------------------------------------------------------------------------------
/sql/backends/monet5/vaults/netcdf_vault.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _NCDF_
10 | #define _NCDF_
11 | #include "mal.h"
12 | #include "mal_client.h"
13 |
14 | #ifdef WIN32
15 | #ifndef LIBNCDF
16 | #define netcdf_export extern __declspec(dllimport)
17 | #else
18 | #define netcdf_export extern __declspec(dllexport)
19 | #endif
20 | #else
21 | #define netcdf_export extern
22 | #endif
23 |
24 | netcdf_export str NCDFtest(int *vars, str *fname);
25 | netcdf_export str NCDFattach(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
26 | netcdf_export str NCDFimportVarStmt(str *sciqlstmt, str *fname, int *varid);
27 | netcdf_export str NCDFimportVariable(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr pci);
28 | #endif
29 |
30 |
--------------------------------------------------------------------------------
/sql/common/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | ## Process this file with automake to produce Makefile.in
8 |
9 | INCLUDES = .. ../include ../storage \
10 | ../../common/options \
11 | ../../common/stream \
12 | ../../monetdb5/mal \
13 | ../../gdk
14 |
15 | lib_sqlcommon = {
16 | NOINST
17 | DIR = libdir
18 | SOURCES = \
19 | sql_mem.c sql_list.c sql_hash.c sql_stack.c sql_backend.c \
20 | sql_keyword.c sql_changeset.c sql_types.c sql_string.c \
21 | sql_backend.h sql_string.h sql_types.h
22 | }
23 |
--------------------------------------------------------------------------------
/sql/include/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | ## Process this file with automake to produce Makefile.in
8 |
9 | #EXTRA_HEADERS = sql_mem.h sql_list.h sql_hash.h sql_catalog.h sql_keyword.h sql_relation.h
10 | EXTRA_DIST = sql_mem.h sql_list.h sql_hash.h sql_stack.h sql_catalog.h sql_keyword.h sql_relation.h
11 |
--------------------------------------------------------------------------------
/sql/include/sql_keyword.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef SQL_KEYWORD_H
10 | #define SQL_KEYWORD_H
11 |
12 | /* we need to define these here as the parser header file is generated to late.
13 | * The numbers get remapped in the scanner.
14 | */
15 | #define KW_ALIAS 4000
16 | #define KW_TYPE 4001
17 |
18 | typedef struct keyword {
19 | char *keyword;
20 | int len;
21 | int token;
22 | struct keyword *next;
23 | } keyword;
24 |
25 | extern void keywords_insert(char *k, int token);
26 | extern keyword *find_keyword(char *text);
27 | extern int keyword_exists(char *text);
28 |
29 | extern void keyword_init(void);
30 | extern void keyword_exit(void);
31 |
32 | #endif /* SQL_KEYWORD_H */
33 |
--------------------------------------------------------------------------------
/sql/scripts/09_like.sql:
--------------------------------------------------------------------------------
1 | -- This Source Code Form is subject to the terms of the Mozilla Public
2 | -- License, v. 2.0. If a copy of the MPL was not distributed with this
3 | -- file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | --
5 | -- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | create filter function "like"(val string, pat string, esc string) external name algebra."like";
8 | create filter function "ilike"(val string, pat string, esc string) external name algebra."ilike";
9 | create filter function "like"(val string, pat string) external name algebra."like";
10 | create filter function "ilike"(val string, pat string) external name algebra."ilike";
11 |
--------------------------------------------------------------------------------
/sql/scripts/10_math.sql:
--------------------------------------------------------------------------------
1 | -- This Source Code Form is subject to the terms of the Mozilla Public
2 | -- License, v. 2.0. If a copy of the MPL was not distributed with this
3 | -- file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | --
5 | -- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | CREATE FUNCTION degrees(r double)
8 | RETURNS double
9 | RETURN r*180/pi();
10 |
11 | CREATE FUNCTION radians(d double)
12 | RETURNS double
13 | RETURN d*pi()/180;
14 |
15 |
--------------------------------------------------------------------------------
/sql/scripts/11_times.sql:
--------------------------------------------------------------------------------
1 | -- This Source Code Form is subject to the terms of the Mozilla Public
2 | -- License, v. 2.0. If a copy of the MPL was not distributed with this
3 | -- file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | --
5 | -- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | -- Provide a simple equivalent for the UNIX times command
8 | -- times 0 ms user 0 ms system 0 ms 0 reads 0 writes
9 |
10 | create procedure times()
11 | external name sql.times;
12 |
--------------------------------------------------------------------------------
/sql/scripts/13_date.sql:
--------------------------------------------------------------------------------
1 | -- This Source Code Form is subject to the terms of the Mozilla Public
2 | -- License, v. 2.0. If a copy of the MPL was not distributed with this
3 | -- file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | --
5 | -- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | create function str_to_date(s string, format string) returns date
8 | external name mtime."str_to_date";
9 |
10 | create function date_to_str(d date, format string) returns string
11 | external name mtime."date_to_str";
12 |
13 | create function str_to_time(s string, format string) returns time
14 | external name mtime."str_to_time";
15 |
16 | create function time_to_str(d time, format string) returns string
17 | external name mtime."time_to_str";
18 |
19 | create function str_to_timestamp(s string, format string) returns timestamp
20 | external name mtime."str_to_timestamp";
21 |
22 | create function timestamp_to_str(d timestamp, format string) returns string
23 | external name mtime."timestamp_to_str";
24 |
--------------------------------------------------------------------------------
/sql/scripts/17_temporal.sql:
--------------------------------------------------------------------------------
1 | -- This Source Code Form is subject to the terms of the Mozilla Public
2 | -- License, v. 2.0. If a copy of the MPL was not distributed with this
3 | -- file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | --
5 | -- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | -- assume milliseconds when converted to TIMESTAMP
8 | create function sys."epoch"(sec BIGINT) returns TIMESTAMP
9 | external name timestamp."epoch";
10 |
11 | create function sys."epoch"(sec INT) returns TIMESTAMP
12 | external name timestamp."epoch";
13 |
14 | create function sys."epoch"(ts TIMESTAMP) returns INT
15 | external name timestamp."epoch";
16 |
17 | create function sys."epoch"(ts TIMESTAMP WITH TIME ZONE) returns INT
18 | external name timestamp."epoch";
19 |
--------------------------------------------------------------------------------
/sql/scripts/20_vacuum.sql:
--------------------------------------------------------------------------------
1 | -- This Source Code Form is subject to the terms of the Mozilla Public
2 | -- License, v. 2.0. If a copy of the MPL was not distributed with this
3 | -- file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | --
5 | -- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | -- Vacuum a relational table should be done with care.
8 | -- For, the oid's are used in join-indices.
9 |
10 | -- Vacuum of tables may improve IO performance and disk footprint.
11 | -- The foreign key constraints should be dropped before
12 | -- and re-established after the cluster operation.
13 |
14 | create procedure shrink(sys string, tab string)
15 | external name sql.shrink;
16 |
17 | create procedure reuse(sys string, tab string)
18 | external name sql.reuse;
19 |
20 | create procedure vacuum(sys string, tab string)
21 | external name sql.vacuum;
22 |
23 |
--------------------------------------------------------------------------------
/sql/scripts/24_zorder.sql:
--------------------------------------------------------------------------------
1 | -- This Source Code Form is subject to the terms of the Mozilla Public
2 | -- License, v. 2.0. If a copy of the MPL was not distributed with this
3 | -- file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | --
5 | -- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | create function zorder_encode(x integer, y integer) returns oid
8 | external name zorder.encode;
9 |
10 | create function zorder_decode_x(z oid) returns integer
11 | external name zorder.decode_x;
12 |
13 | create function zorder_decode_y(z oid) returns integer
14 | external name zorder.decode_y;
15 |
16 |
--------------------------------------------------------------------------------
/sql/scripts/27_rejects.sql:
--------------------------------------------------------------------------------
1 | -- This Source Code Form is subject to the terms of the Mozilla Public
2 | -- License, v. 2.0. If a copy of the MPL was not distributed with this
3 | -- file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | --
5 | -- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | -- COPY into reject management
8 |
9 | create function sys.rejects()
10 | returns table(
11 | rowid bigint,
12 | fldid int,
13 | "message" string,
14 | "input" string
15 | )
16 | external name sql.copy_rejects;
17 |
18 | create view sys.rejects as select * from sys.rejects();
19 | create procedure sys.clearrejects()
20 | external name sql.copy_rejects_clear;
21 |
--------------------------------------------------------------------------------
/sql/scripts/39_analytics_hge.sql:
--------------------------------------------------------------------------------
1 | -- This Source Code Form is subject to the terms of the Mozilla Public
2 | -- License, v. 2.0. If a copy of the MPL was not distributed with this
3 | -- file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | --
5 | -- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | create aggregate stddev_samp(val HUGEINT) returns DOUBLE
8 | external name "aggr"."stdev";
9 | create aggregate stddev_pop(val HUGEINT) returns DOUBLE
10 | external name "aggr"."stdevp";
11 | create aggregate var_samp(val HUGEINT) returns DOUBLE
12 | external name "aggr"."variance";
13 | create aggregate var_pop(val HUGEINT) returns DOUBLE
14 | external name "aggr"."variancep";
15 | create aggregate median(val HUGEINT) returns HUGEINT
16 | external name "aggr"."median";
17 | create aggregate quantile(val HUGEINT, q DOUBLE) returns HUGEINT
18 | external name "aggr"."quantile";
19 | create aggregate corr(e1 HUGEINT, e2 HUGEINT) returns HUGEINT
20 | external name "aggr"."corr";
21 |
--------------------------------------------------------------------------------
/sql/scripts/40_json_hge.sql:
--------------------------------------------------------------------------------
1 | -- This Source Code Form is subject to the terms of the Mozilla Public
2 | -- License, v. 2.0. If a copy of the MPL was not distributed with this
3 | -- file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | --
5 | -- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | -- (co) Martin Kersten
8 | -- The JSON type comes with a few operators.
9 |
10 | create function json.filter(js json, name hugeint)
11 | returns json external name json.filter;
12 |
--------------------------------------------------------------------------------
/sql/scripts/41_md5sum.sql:
--------------------------------------------------------------------------------
1 | -- This Source Code Form is subject to the terms of the Mozilla Public
2 | -- License, v. 2.0. If a copy of the MPL was not distributed with this
3 | -- file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | --
5 | -- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | -- (co) Arjen de Rijke
8 |
9 | create function sys.md5(v string)
10 | returns string external name clients.md5sum;
11 |
--------------------------------------------------------------------------------
/sql/scripts/45_uuid.sql:
--------------------------------------------------------------------------------
1 | -- This Source Code Form is subject to the terms of the Mozilla Public
2 | -- License, v. 2.0. If a copy of the MPL was not distributed with this
3 | -- file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | --
5 | -- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | -- (co) Martin Kersten
8 | -- The JSON type comes with a few operators.
9 |
10 | create type uuid external name uuid;
11 |
12 | -- generate a new uuid
13 | create function sys.uuid()
14 | returns uuid external name uuid."new";
15 |
16 | create function sys.isaUUID(u uuid)
17 | returns uuid external name uuid."isaUUID";
18 |
19 | create function sys.isaUUID(u string)
20 | returns uuid external name uuid."isaUUID";
21 |
--------------------------------------------------------------------------------
/sql/scripts/99_system.sql:
--------------------------------------------------------------------------------
1 | -- This Source Code Form is subject to the terms of the Mozilla Public
2 | -- License, v. 2.0. If a copy of the MPL was not distributed with this
3 | -- file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | --
5 | -- Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | -- only system functions until now
8 | create table systemfunctions (function_id)
9 | as (select id from functions) with data;
10 | grant select on systemfunctions to public;
11 |
12 | -- only system tables until now
13 | update _tables set system = true;
14 |
15 | -- only system schemas until now
16 | update schemas set system = true;
17 |
--------------------------------------------------------------------------------
/sql/server/rel_distribute.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _REL_DISTRIBUTE_H_
10 | #define _REL_DISTRIBUTE_H_
11 |
12 | #include "rel_semantic.h"
13 |
14 | extern sql_rel * rel_distribute(mvc *sql, sql_rel *rel);
15 |
16 | #endif /*_REL_DISTRIBUTE_H_*/
17 |
--------------------------------------------------------------------------------
/sql/server/rel_dump.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _REL_DUMP_H_
10 | #define _REL_DUMP_H_
11 |
12 | #include "rel_semantic.h"
13 |
14 | extern void rel_print(mvc *sql, sql_rel *rel, int depth);
15 | extern void _rel_print(mvc *sql, sql_rel *rel);
16 | extern const char *op2string(operator_type op);
17 |
18 | extern sql_rel *rel_read(mvc *sql, char *ra, int *pos, list *refs);
19 |
20 | #endif /*_REL_DUMP_H_*/
21 |
--------------------------------------------------------------------------------
/sql/server/rel_optimizer.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _REL_OPTIMIZER_H_
10 | #define _REL_OPTIMIZER_H_
11 |
12 | #include "rel_semantic.h"
13 |
14 | extern sql_rel * rel_optimizer(mvc *sql, sql_rel *rel);
15 |
16 | extern int exp_joins_rels(sql_exp *e, list *rels);
17 |
18 | extern void *name_find_column( sql_rel *rel, char *rname, char *name, int pnr, sql_rel **bt );
19 |
20 | #endif /*_REL_OPTIMIZER_H_*/
21 |
--------------------------------------------------------------------------------
/sql/server/rel_planner.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _REL_PLANNER_H_
10 | #define _REL_PLANNER_H_
11 |
12 | #include "rel_semantic.h"
13 |
14 | extern sql_rel * rel_planner(mvc *sql, list *rels, list *djes, list *ojes);
15 |
16 | #endif /*_REL_PLANNER_H_ */
17 |
--------------------------------------------------------------------------------
/sql/server/rel_psm.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _REL_PSM_H_
10 | #define _REL_PSM_H_
11 |
12 | #include
13 | #include
14 | #include
15 | #include
16 | #include "sql_symbol.h"
17 | #include "sql_mvc.h"
18 |
19 | /* We need bit wise exclusive numbers as we merge the level also in the flag */
20 | #define PSM_SET 1
21 | #define PSM_VAR 2
22 | #define PSM_RETURN 4
23 | #define PSM_WHILE 8
24 | #define PSM_IF 16
25 | #define PSM_REL 32
26 |
27 | #define SET_PSM_LEVEL(level) (level<<8)
28 | #define GET_PSM_LEVEL(level) (level>>8)
29 |
30 | extern sql_rel *rel_psm(mvc *sql, symbol *sym);
31 | extern sql_rel *rel_select_with_into( mvc *sql, symbol *sq);
32 |
33 | #endif /*_REL_PSM_H_*/
34 |
--------------------------------------------------------------------------------
/sql/server/rel_schema.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _REL_SCHEMA_H_
10 | #define _REL_SCHEMA_H_
11 |
12 | #include
13 | #include
14 | #include
15 | #include "sql_symbol.h"
16 |
17 | extern sql_rel *rel_schemas(mvc *sql, symbol *sym);
18 |
19 | extern sql_rel *rel_create_table(mvc *sql, sql_schema *ss, int temp, char *sname, char *name, symbol *table_elements_or_subquery, int commit_action, char *loc);
20 | extern sql_rel *rel_list(sql_allocator *sa, sql_rel *l, sql_rel *r);
21 | extern sql_table * mvc_create_table_as_subquery( mvc *sql, sql_rel *sq, sql_schema *s, char *tname, dlist *column_spec, int temp, int commit_action );
22 |
23 | #endif /*_REL_SCHEMA_H_*/
24 |
--------------------------------------------------------------------------------
/sql/server/rel_semantic.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _REL_SEMANTIC_H_
10 | #define _REL_SEMANTIC_H_
11 |
12 | #include
13 | #include "sql_symbol.h"
14 | #include "sql_parser.h"
15 | #include "sql_relation.h"
16 | #include
17 |
18 | extern sql_rel *rel_semantic(mvc *sql, symbol *sym);
19 | extern sql_rel *rel_parse(mvc *m, sql_schema *s, char *query, char emode);
20 |
21 | extern comp_type swap_compare( comp_type t );
22 | extern comp_type range2lcompare( int r );
23 | extern comp_type range2rcompare( int r );
24 | extern int compare2range( int l, int r );
25 |
26 | #endif /*_REL_SEMANTIC_H_*/
27 |
28 |
--------------------------------------------------------------------------------
/sql/server/rel_sequence.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _REL_SEQUENCE_H_
10 | #define _REL_SEQUENCE_H_
11 |
12 | #include "sql_symbol.h"
13 | #include
14 |
15 | extern sql_rel *rel_sequences(mvc *sql, symbol *s);
16 | extern char* sql_next_seq_name(mvc *sql);
17 |
18 | #endif /*_REL_SEQUENCE_H_*/
19 |
--------------------------------------------------------------------------------
/sql/server/rel_trans.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _REL_TRANS_H_
10 | #define _REL_TRANS_H_
11 |
12 | #include "sql_symbol.h"
13 | #include "sql_mvc.h"
14 | #include "sql_relation.h"
15 |
16 | extern sql_rel *rel_transactions(mvc *sql, symbol *sym);
17 |
18 | #endif /*_REL_TRANS_H_*/
19 |
20 |
--------------------------------------------------------------------------------
/sql/server/rel_xml.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _REL_XML_H_
10 | #define _REL_XML_H_
11 |
12 | #include "rel_semantic.h"
13 | #include "sql_semantic.h"
14 |
15 | extern sql_exp *rel_xml(mvc *sql, sql_rel **rel, symbol *s, int f, exp_kind knd);
16 |
17 | #endif /*_REL_XML_H_ */
18 |
--------------------------------------------------------------------------------
/sql/server/sql_decimal.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _SQL_DECIMAL_H
10 | #define _SQL_DECIMAL_H
11 |
12 | #include "sql_mem.h"
13 | #include "sql_types.h"
14 | #include
15 |
16 | #ifdef HAVE_HGE
17 | extern hge decimal_from_str(char *dec, char **end);
18 | extern char * decimal_to_str(hge v, sql_subtype *t);
19 | #else
20 | extern lng decimal_from_str(char *dec, char **end);
21 | extern char * decimal_to_str(lng v, sql_subtype *t);
22 | #endif
23 |
24 | #endif /* _SQL_DECIMAL_H */
25 |
26 |
--------------------------------------------------------------------------------
/sql/server/sql_env.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _SQL_ENV_H_
10 | #define _SQL_ENV_H_
11 |
12 | #include "sql_parser.h"
13 | #include "sql_symbol.h"
14 | #include "sql_mvc.h"
15 |
16 | extern int mvc_debug_on(mvc *m, int flag);
17 |
18 | extern str sql_update_var(mvc *sql, char *name, char *sval, lng sgn);
19 |
20 | extern int sql_create_env(mvc *sql, sql_schema *s);
21 |
22 | #define NR_KEEPQUERY_ARGS 4
23 | #define NR_KEEPCALL_ARGS 9
24 |
25 | #endif /* _SQL_ENV_H_ */
26 |
--------------------------------------------------------------------------------
/sql/storage/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | ## Process this file with automake to produce Makefile.in
8 |
9 | #EXTRA_HEADERS = sql_storage.h
10 |
11 | SUBDIRS = bat
12 |
13 | INCLUDES = ../include ../common \
14 | ../../common/options \
15 | ../../common/stream \
16 | ../../gdk
17 |
18 | lib_store = {
19 | NOINST
20 | DIR = libdir
21 | SOURCES = \
22 | store_dependency.c store_connections.c store_sequence.c \
23 | store.c sql_catalog.c \
24 | sql_storage.h store_connections.h store_dependency.h \
25 | store_sequence.h
26 | }
27 |
--------------------------------------------------------------------------------
/sql/storage/bat/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | ## Process this file with automake to produce Makefile.in
8 |
9 | INCLUDES = .. ../../include ../../common \
10 | ../../../common/options \
11 | ../../../common/stream \
12 | ../../../gdk \
13 | ../../../monetdb5/modules/atoms \
14 | ../../../monetdb5/modules/kernel \
15 | ../../../monetdb5/mal \
16 | ../../../monetdb5/modules/mal \
17 | ../../../monetdb5/optimizer \
18 | ../../../monetdb5/scheduler
19 |
20 | lib_batstore = {
21 | NOINST
22 | DIR = libdir
23 | SOURCES = \
24 | bat_table.c bat_storage.c bat_logger.c bat_utils.c \
25 | res_table.c \
26 | bat_logger.h bat_storage.h bat_table.h bat_utils.h res_table.h
27 | }
28 |
--------------------------------------------------------------------------------
/sql/storage/bat/bat_logger.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef BAT_LOGGER_H
10 | #define BAT_LOGGER_H
11 |
12 | #include "sql_storage.h"
13 | #include
14 |
15 | extern logger *bat_logger;
16 |
17 | extern int bat_logger_init( logger_functions *lf );
18 |
19 | #endif /*BAT_LOGGER_H */
20 |
--------------------------------------------------------------------------------
/sql/storage/bat/bat_table.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef BAT_TABLE_H
10 | #define BAT_TABLE_H
11 |
12 | #include "sql_storage.h"
13 | #include "bat_storage.h"
14 | #include "bat_utils.h"
15 |
16 | /* initialize bat storage call back functions interface */
17 | extern int bat_table_init( table_functions *tf );
18 |
19 | #endif /*BAT_TABLE_H*/
20 |
--------------------------------------------------------------------------------
/sql/storage/bat/res_table.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef RES_TABLE_H
10 | #define RES_TABLE_H
11 |
12 | #include "sql_catalog.h"
13 |
14 | #endif /* RES_TABLE_H */
15 |
--------------------------------------------------------------------------------
/sql/storage/store_connections.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef STORE_CONNECTIONS_H
10 | #define STORE_CONNECTIONS_H
11 |
12 | #include "store_dependency.h"
13 |
14 | #endif /*STORE_DEPEND_H */
15 |
--------------------------------------------------------------------------------
/sql/storage/store_dependency.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef STORE_DEPEND_H
10 | #define STORE_DEPEND_H
11 |
12 | #include "sql_types.h"
13 | #include "sql_backend.h"
14 | #include "store_sequence.h"
15 |
16 | #endif /*STORE_DEPEND_H */
17 |
--------------------------------------------------------------------------------
/testing/Mlog.bat:
--------------------------------------------------------------------------------
1 | @REM This Source Code Form is subject to the terms of the Mozilla Public
2 | @REM License, v. 2.0. If a copy of the MPL was not distributed with this
3 | @REM file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | @REM
5 | @REM Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | @echo off
8 |
9 | if not '%1' == '-x' (
10 | echo # ..:..:.. . %*
11 | goto :EOF
12 | )
13 |
14 | prompt # $t $g
15 | echo on
16 | call %~2 %~3 %~4 %~5 %~6 %~7 %~8 %~9
17 |
--------------------------------------------------------------------------------
/testing/Mtest.py.bat:
--------------------------------------------------------------------------------
1 | @REM This Source Code Form is subject to the terms of the Mozilla Public
2 | @REM License, v. 2.0. If a copy of the MPL was not distributed with this
3 | @REM file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | @REM
5 | @REM Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | @python "%~dpn0" %*
8 |
--------------------------------------------------------------------------------
/testing/__init__.py:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fpgasystems/doppiodb/a6668192b90d4372303c2b79eeff97eb8089792b/testing/__init__.py
--------------------------------------------------------------------------------
/testing/helpers.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef HELPERS_H
10 | #define HELPERS_H
11 |
12 | #include
13 |
14 | #define MAX(a,b) (((a)>(b))?(a):(b))
15 | #define MIN(a,b) (((a)<(b))?(a):(b))
16 |
17 | __declspec(noreturn) void ErrXit(char *text1, char *text2, int num)
18 | __attribute__((__noreturn__));
19 | FILE *Rfopen(char *name);
20 | FILE *Wfopen(char *name);
21 | FILE *Afopen(char *name);
22 | #define isalpha_(c) (isascii(c) && (isalpha(c) || c == '_'))
23 | #define isspace_(c) (isascii(c) && isspace(c))
24 | #define isdigit_(c) (isascii(c) && isdigit(c))
25 | char *filename(char *path);
26 | char *tmpdir(void);
27 |
28 | #endif /* HELPERS_H */
29 |
--------------------------------------------------------------------------------
/tools/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | SUBDIRS = HAVE_MONETDB5?mserver NOT_WIN32?merovingian
8 |
--------------------------------------------------------------------------------
/tools/merovingian/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | SUBDIRS = utils client HAVE_MONETDB5?daemon
8 |
--------------------------------------------------------------------------------
/tools/merovingian/client/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | man_MANS = monetdb.1
8 |
9 | INCLUDES = ../../../common/stream \
10 | ../../../common/utils \
11 | ../utils
12 |
13 | EXTRA_DIST = $(man_MANS)
14 |
15 | bin_monetdb = {
16 | SOURCES = monetdb.c
17 | LIBS = ../utils/libmeroutil \
18 | ../../../common/stream/libstream \
19 | ../../../common/utils/libmcrypt \
20 | ../../../common/utils/libmsabaoth \
21 | ../../../common/utils/libmuuid \
22 | ../../../common/utils/libmutils \
23 | $(UUID_LIBS) \
24 | $(openssl_LIBS) \
25 | $(curl_LIBS) \
26 | $(SOCKET_LIBS) \
27 | $(MALLOC_LIBS)
28 | }
29 |
--------------------------------------------------------------------------------
/tools/merovingian/daemon/.merovingian_properties:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | # DO NOT EDIT THIS FILE - use monetdbd(1) to set these properties
8 |
9 | # This file is used by monetdbd and contains defaults for a system-wide
10 | # installation of the MonetDB Database Server. This file is a mere
11 | # template, and will get overwritten as soon as monetdbd is started. It
12 | # is, however, crucial that the file locations in this file are present.
13 |
14 |
15 | logfile=/home/kkara/Projects/MyMonetDB/var/log/monetdb/merovingian.log
16 | pidfile=/home/kkara/Projects/MyMonetDB/var/run/monetdb/merovingian.pid
17 |
--------------------------------------------------------------------------------
/tools/merovingian/daemon/.merovingian_properties.in:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | # DO NOT EDIT THIS FILE - use monetdbd(1) to set these properties
8 |
9 | # This file is used by monetdbd and contains defaults for a system-wide
10 | # installation of the MonetDB Database Server. This file is a mere
11 | # template, and will get overwritten as soon as monetdbd is started. It
12 | # is, however, crucial that the file locations in this file are present.
13 |
14 |
15 | logfile=@Elogdir@@DIRSEP@merovingian.log
16 | pidfile=@Erundir@@DIRSEP@merovingian.pid
17 |
--------------------------------------------------------------------------------
/tools/merovingian/daemon/argvcmds.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _ARGVCMDS_H
10 | #define _ARGVCMDS_H 1
11 |
12 | #include
13 |
14 | int command_help(int argc, char *argv[]);
15 | int command_version(void);
16 | int command_create(int argc, char *argv[]);
17 | int command_get(confkeyval *ckv, int argc, char *argv[]);
18 | int command_set(confkeyval *ckv, int argc, char *argv[]);
19 | int command_stop(confkeyval *ckv, int argc, char *argv[]);
20 |
21 | #endif
22 |
--------------------------------------------------------------------------------
/tools/merovingian/daemon/client.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _CLIENT_H
10 | #define _CLIENT_H 1
11 |
12 | char *acceptConnections(int sock, int usock);
13 |
14 | #endif
15 |
16 | /* vim:set ts=4 sw=4 noexpandtab: */
17 |
--------------------------------------------------------------------------------
/tools/merovingian/daemon/connections.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _CONNECTIONS_H
10 | #define _CONNECTIONS_H 1
11 |
12 | #include
13 | #include "merovingian.h"
14 |
15 | err openConnectionTCP(int *ret, unsigned short port, FILE *log);
16 | err openConnectionUDP(int *ret, unsigned short port);
17 | err openConnectionUNIX(int *ret, char *path, int mode, FILE *log);
18 |
19 | #endif
20 |
21 | /* vim:set ts=4 sw=4 noexpandtab: */
22 |
--------------------------------------------------------------------------------
/tools/merovingian/daemon/controlrunner.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _CONTROLRUNNER_H
10 | #define _CONTROLRUNNER_H 1
11 |
12 | #include "stream.h"
13 |
14 | char control_authorise(const char *host, const char *chal, const char *algo, const char *passwd, stream *fout);
15 | void control_handleclient(const char *host, int sock, stream *fdin, stream *fdout);
16 | void controlRunner(void *d);
17 |
18 | #endif
19 |
20 | /* vim:set ts=4 sw=4 noexpandtab: */
21 |
--------------------------------------------------------------------------------
/tools/merovingian/daemon/forkmserver.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _FORKMSERVER_H
10 | #define _FORKMSERVER_H 1
11 |
12 | #include /* sabdb */
13 | #include "merovingian.h" /* err */
14 |
15 | err forkMserver(char* database, sabdb** stats, int force);
16 |
17 | #endif
18 |
19 | /* vim:set ts=4 sw=4 noexpandtab: */
20 |
--------------------------------------------------------------------------------
/tools/merovingian/daemon/handlers.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _HANDLERS_H
10 | #define _HANDLERS_H 1
11 |
12 | #include
13 |
14 | void handler(int sig);
15 | void huphandler(int sig);
16 | void childhandler(int sig, siginfo_t *si, void *unused);
17 | void segvhandler(int sig);
18 |
19 | #endif
20 |
21 | /* vim:set ts=4 sw=4 noexpandtab: */
22 |
--------------------------------------------------------------------------------
/tools/merovingian/daemon/peering.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _PEERING_H
10 | #define _PEERING_H 1
11 |
12 | void peeringServerThread(void *d);
13 |
14 | #endif
15 |
16 | /* vim:set ts=4 sw=4 noexpandtab: */
17 |
--------------------------------------------------------------------------------
/tools/merovingian/daemon/proxy.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _PROXY_H
10 | #define _PROXY_H 1
11 |
12 | #include "merovingian.h"
13 |
14 | err startProxy(int psock, stream *cfdin, stream *cfout, char *url, char *client);
15 |
16 | #endif
17 |
18 | /* vim:set ts=4 sw=4 noexpandtab: */
19 |
--------------------------------------------------------------------------------
/tools/merovingian/utils/Makefile.ag:
--------------------------------------------------------------------------------
1 | # This Source Code Form is subject to the terms of the Mozilla Public
2 | # License, v. 2.0. If a copy of the MPL was not distributed with this
3 | # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4 | #
5 | # Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
6 |
7 | INCLUDES = ../../../common/stream \
8 | ../../../common/options \
9 | ../../../common/utils \
10 | $(openssl_CFLAGS)
11 |
12 | lib_meroutil = {
13 | NOINST
14 | SOURCES = \
15 | control.c control.h \
16 | database.c database.h \
17 | glob.c glob.h \
18 | properties.c properties.h \
19 | utils.c utils.h
20 | }
21 |
--------------------------------------------------------------------------------
/tools/merovingian/utils/control.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _SEEN_CONTROL_H
10 | #define _SEEN_CONTROL_H 1
11 |
12 | char* control_send(
13 | char** ret,
14 | char* host,
15 | int port,
16 | char* database,
17 | char* command,
18 | char wait,
19 | char* pass);
20 | char* control_hash(char *pass, char *salt);
21 | char control_ping(char *host, int port, char *pass);
22 |
23 | #endif
24 |
--------------------------------------------------------------------------------
/tools/merovingian/utils/database.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _SEEN_DATABASE_H
10 | #define _SEEN_DATABASE_H 1
11 |
12 | char* db_validname(char* dbname);
13 | char* db_create(char* dbname);
14 | char* db_destroy(char* dbname);
15 | char* db_rename(char* olddb, char* newdb);
16 | char* db_lock(char* dbname);
17 | char* db_release(char* dbname);
18 |
19 | #endif
20 |
--------------------------------------------------------------------------------
/tools/merovingian/utils/glob.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _SEEN_GLOB_H
10 | #define _SEEN_GLOB_H 1
11 |
12 | char glob(const char *expr, const char *haystack);
13 |
14 | #endif
15 |
16 | /* vim:set ts=4 sw=4 noexpandtab: */
17 |
--------------------------------------------------------------------------------
/tools/merovingian/utils/properties.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef _SEEN_PROPERTIES_H
10 | #define _SEEN_PROPERTIES_H 1
11 |
12 | #include "utils.h"
13 |
14 | #define MEROPROPFILE ".merovingian_properties"
15 |
16 | confkeyval *getDefaultProps(void);
17 | int writeProps(confkeyval *ckv, const char *path);
18 | void writePropsBuf(confkeyval *ckv, char **buf);
19 | int readProps(confkeyval *ckv, const char *path);
20 | void readPropsBuf(confkeyval *ckv, char *buf);
21 | char *setProp(char *path, char *key, char *val);
22 |
23 | #endif
24 |
25 | /* vim:set ts=4 sw=4 noexpandtab: */
26 |
--------------------------------------------------------------------------------
/tools/mserver/monet_version.h:
--------------------------------------------------------------------------------
1 | /*
2 | * This Source Code Form is subject to the terms of the Mozilla Public
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this
4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 | *
6 | * Copyright 1997 - July 2008 CWI, August 2008 - 2016 MonetDB B.V.
7 | */
8 |
9 | #ifndef MONETDB_VERSION_H
10 | #define MONETDB_VERSION_H
11 |
12 | extern void monet_version(void);
13 |
14 | #endif /* MONETDB_VERSION_H */
15 |
--------------------------------------------------------------------------------
/tools/mserver/monetdblogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fpgasystems/doppiodb/a6668192b90d4372303c2b79eeff97eb8089792b/tools/mserver/monetdblogo.png
--------------------------------------------------------------------------------
/tools/mserver/tomographintro.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fpgasystems/doppiodb/a6668192b90d4372303c2b79eeff97eb8089792b/tools/mserver/tomographintro.docx
--------------------------------------------------------------------------------
/tools/mserver/tomographintro.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/fpgasystems/doppiodb/a6668192b90d4372303c2b79eeff97eb8089792b/tools/mserver/tomographintro.pdf
--------------------------------------------------------------------------------