├── Makefile ├── Makefile.mingw ├── Makefile.win ├── Makefile.win.ado ├── Makefile.win.firebird ├── Makefile.win.mysql ├── Makefile.win.odbc ├── Makefile.win.sqlite3 ├── README ├── config ├── doc ├── br │ ├── examples.html │ ├── history.html │ ├── index.html │ ├── license.html │ ├── luasql.png │ └── manual.html ├── fr │ ├── doc.css │ ├── examples.html │ ├── history.html │ ├── index.html │ ├── license.html │ ├── luasql.png │ └── manual.html └── us │ ├── doc.css │ ├── examples.html │ ├── history.html │ ├── index.html │ ├── license.html │ ├── luasql.png │ └── manual.html ├── rockspec ├── luasql-firebird-2.4.0-1.rockspec ├── luasql-firebird-2.5.0-1.rockspec ├── luasql-firebird-2.6.0-1.rockspec ├── luasql-firebird-2.6.0-2.rockspec ├── luasql-firebird-2.6.0-3.rockspec ├── luasql-firebird-2.7.0-1.rockspec ├── luasql-mysql-2.2.0rc1-1.rockspec ├── luasql-mysql-2.2.0rc1-2.rockspec ├── luasql-mysql-2.3.0-1.rockspec ├── luasql-mysql-2.3.4-1.rockspec ├── luasql-mysql-2.3.5-1.rockspec ├── luasql-mysql-2.4.0-1.rockspec ├── luasql-mysql-2.5.0-1.rockspec ├── luasql-mysql-2.6.0-1.rockspec ├── luasql-mysql-2.6.0-2.rockspec ├── luasql-mysql-2.6.0-3.rockspec ├── luasql-mysql-2.7.0-1.rockspec ├── luasql-mysql-cvs-1.rockspec ├── luasql-oci8-2.3.0-1.rockspec ├── luasql-oci8-2.3.4-1.rockspec ├── luasql-oci8-2.4.0-1.rockspec ├── luasql-oci8-2.5.0-1.rockspec ├── luasql-oci8-2.6.0-1.rockspec ├── luasql-oci8-2.6.0-2.rockspec ├── luasql-oci8-2.6.0-3.rockspec ├── luasql-odbc-2.3.0-1.rockspec ├── luasql-odbc-2.3.4-1.rockspec ├── luasql-odbc-2.4.0-1.rockspec ├── luasql-odbc-2.5.0-1.rockspec ├── luasql-odbc-2.6.0-1.rockspec ├── luasql-odbc-2.6.0-2.rockspec ├── luasql-odbc-2.6.0-3.rockspec ├── luasql-odbc-cvs-1.rockspec ├── luasql-postgres-2.3.0-1.rockspec ├── luasql-postgres-2.3.1-1.rockspec ├── luasql-postgres-2.3.2-1.rockspec ├── luasql-postgres-2.3.3-1.rockspec ├── luasql-postgres-2.3.4-1.rockspec ├── luasql-postgres-2.3.5-1.rockspec ├── luasql-postgres-2.3.5-2.rockspec ├── luasql-postgres-2.4.0-1.rockspec ├── luasql-postgres-2.5.0-1.rockspec ├── luasql-postgres-2.6.0-1.rockspec ├── luasql-postgres-2.6.0-2.rockspec ├── luasql-postgres-2.6.0-3.rockspec ├── luasql-postgres-2.7.0-1.rockspec ├── luasql-postgres-cvs-2.rockspec ├── luasql-sqlite-2.2.0rc1-1.rockspec ├── luasql-sqlite-2.3.0-1.rockspec ├── luasql-sqlite-2.3.4-1.rockspec ├── luasql-sqlite-2.4.0-1.rockspec ├── luasql-sqlite-2.5.0-1.rockspec ├── luasql-sqlite-2.6.0-1.rockspec ├── luasql-sqlite-2.6.0-2.rockspec ├── luasql-sqlite-2.6.0-3.rockspec ├── luasql-sqlite-cvs-1.rockspec ├── luasql-sqlite3-2.2.0-1.rockspec ├── luasql-sqlite3-2.2.0rc1-1.rockspec ├── luasql-sqlite3-2.3.0-1.rockspec ├── luasql-sqlite3-2.3.4-1.rockspec ├── luasql-sqlite3-2.3.5-1.rockspec ├── luasql-sqlite3-2.4.0-1.rockspec ├── luasql-sqlite3-2.5.0-1.rockspec ├── luasql-sqlite3-2.6.0-1.rockspec ├── luasql-sqlite3-2.6.0-2.rockspec ├── luasql-sqlite3-2.6.0-3.rockspec ├── luasql-sqlite3-2.6.1-3.rockspec ├── luasql-sqlite3-2.7.0-1.rockspec └── luasql-sqlite3-cvs-1.rockspec ├── src ├── ado │ └── ado.lua ├── firebird.def ├── jdbc │ ├── Makefile │ ├── Makefile.win │ ├── build.xml │ └── src │ │ ├── java │ │ └── org │ │ │ └── keplerproject │ │ │ └── luasql │ │ │ └── jdbc │ │ │ └── LuaSQLCursor.java │ │ └── lua │ │ └── jdbc.lua ├── ls_firebird.c ├── ls_mysql.c ├── ls_oci8.c ├── ls_odbc.c ├── ls_postgres.c ├── ls_sqlite.c ├── ls_sqlite3.c ├── luasql.c ├── luasql.h ├── mysql.def ├── oci8.def ├── odbc.def ├── postgres.def ├── sqlite.def └── sqlite3.def ├── tests ├── ado.lua ├── example.lua ├── firebird.lua ├── mysql.lua ├── oci8.lua ├── odbc.lua ├── performance.lua ├── postgres.lua ├── sqlite.lua ├── sqlite3.lua ├── test.lua └── to_be_closed_support.lua └── vc6 ├── def.tmpl ├── luasql.dsw ├── luasqlmysql40_dll.dsp ├── luasqlmysql41_dll.dsp ├── luasqlmysql50_dll.dsp ├── luasqloci8_dll.dsp ├── luasqlodbc_dll.dsp ├── luasqlpostgres_dll.dsp ├── luasqlsqlite_dll.dsp ├── mysql.def ├── mysql40.rc ├── mysql41.rc ├── mysql50.rc ├── oci8.def ├── odbc.def ├── postgres.def ├── postgres.rc ├── resource.h └── sqlite.def /Makefile: -------------------------------------------------------------------------------- 1 | V= 2.7.0 2 | CONFIG= ./config 3 | 4 | include $(CONFIG) 5 | 6 | OBJS= src/luasql.o 7 | SRCS= src/luasql.h src/luasql.c 8 | 9 | # list of all driver names 10 | DRIVER_LIST= $(subst src/ls_,,$(basename $(wildcard src/ls_*.c))) 11 | 12 | # used for help formatting 13 | EMPTY= 14 | SPACE= $(EMPTY) $(EMPTY) 15 | 16 | all : 17 | @echo "usage: make { $(subst $(SPACE),$(SPACE)|$(SPACE),$(DRIVER_LIST)) }" 18 | 19 | # explicitly matches against the list of available driver names 20 | $(DRIVER_LIST) : % : src/%.so 21 | 22 | # builds the specified driver 23 | src/%.so : src/ls_%.c $(OBJS) 24 | $(CC) $(CFLAGS) src/ls_$*.c -o $@ $(LIB_OPTION) $(OBJS) $(DRIVER_INCS_$*) $(DRIVER_LIBS_$*) 25 | 26 | # builds the general LuaSQL functions 27 | $(OBJS) : $(SRCS) 28 | $(CC) $(CFLAGS) -c src/luasql.c -o src/luasql.o 29 | 30 | install: 31 | mkdir -p $(LUA_LIBDIR)/luasql 32 | cp src/*.so $(LUA_LIBDIR)/luasql 33 | 34 | jdbc_driver: 35 | cd src/jdbc; make $@ 36 | 37 | clean: 38 | rm -f src/*.so src/*.o 39 | 40 | -------------------------------------------------------------------------------- /Makefile.mingw: -------------------------------------------------------------------------------- 1 | LUA_INC = -I/usr/local/include 2 | LUA_LIB = -L/usr/local/lib 3 | DRIVER_INC = ./driver 4 | DRIVER_LIB = ./driver 5 | CFLAG = -Wall -O2 -shared 6 | CC = gcc 7 | LUA_DIR = /usr/local/lib/lua/5.3/luasql 8 | 9 | all: 10 | echo "press mysql,sqlite,sqlite3,odbc" 11 | 12 | mysql:src/mysql.dll 13 | sqlite3:src/sqlite3.dll 14 | odbc:src/odbc.dll 15 | 16 | src/mysql.dll:src/luasql.c src/ls_mysql.c 17 | $(CC) $(CFLAG) $(LUA_INC) $(LUA_LIB) -I$(DRIVER_INC)/mysql/include -L$(DRIVER_LIB)/mysql/lib/ -o $@ $^ -llua53 -lmysql 18 | 19 | src/sqlite3.dll:src/luasql.c src/ls_sqlite3.c 20 | $(CC) $(CFLAG) $(LUA_INC) $(LUA_LIB) -I$(DRIVER_INC)/sqlite3/include -L$(DRIVER_LIB)/sqlite3/lib/ -o $@ $^ -lsqlite3 -llua53 21 | 22 | src/odbc.dll:src/luasql.c src/ls_odbc.c 23 | $(CC) $(CFLAG) $(LUA_INC) $(LUA_LIB) -o $@ $^ -lodbc32 -llua53 24 | 25 | install: 26 | -mkdir $(LUA_DIR) 27 | -cp src/*.dll $(LUA_DIR) 28 | uninstall: 29 | -rm -rf $(LUA_DIR) 30 | clean: 31 | -rm src/*.dll 32 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /Makefile.win: -------------------------------------------------------------------------------- 1 | 2 | OBJS= src\luasql.obj src\ls_$T.obj 3 | 4 | SRCS= src\luasql.h src\luasql.c src\ls_$T.c 5 | 6 | LIBNAME= $T.dll 7 | 8 | all: src\$(LIBNAME) 9 | 10 | .c.obj: 11 | cl /c /Fo$@ /O2 $(CFLAGS) /DWIN32 /D_CRT_SECURE_NO_DEPRECATE $< 12 | 13 | src\$(LIBNAME): $(OBJS) 14 | link /dll /def:src\$T.def /out:$@ $(LIB_OPTION) $(OBJS) 15 | 16 | install: 17 | IF NOT EXIST "$(LUA_LIBDIR)\luasql" mkdir "$(LUA_LIBDIR)\luasql" 18 | cp src\$(LIBNAME) "$(LUA_LIBDIR)\luasql" 19 | -------------------------------------------------------------------------------- /Makefile.win.ado: -------------------------------------------------------------------------------- 1 | LUA_DIR=c:\lua5.1\lua 2 | 3 | install: 4 | IF NOT EXIST $(LUA_DIR)\luasql mkdir $(LUA_DIR)\luasql 5 | copy src\ado\ado.lua $(LUA_DIR)\luasql 6 | 7 | clean: 8 | 9 | -------------------------------------------------------------------------------- /Makefile.win.firebird: -------------------------------------------------------------------------------- 1 | LUA_INC=c:\lua5.1\include 2 | LUA_DIR=c:\lua5.1\lua 3 | LUA_LIBDIR=c:\lua5.1 4 | LUA_LIB=c:\lua5.1\lua5.1.lib 5 | 6 | T=firebird 7 | 8 | DRIVER_INCLUDE= 9 | DRIVER_LIBS=fbclient_ms.lib 10 | 11 | OBJS= src\luasql.obj src\ls_$T.obj 12 | 13 | .c.obj: 14 | cl /c /Fo$@ /O2 /I$(LUA_INC) /D_CRT_SECURE_NO_DEPRECATE $(DRIVER_INCLUDE) $< 15 | 16 | src\$T.dll: $(OBJS) 17 | link /dll /def:src\$T.def /out:$@ $(OBJS) $(DRIVER_LIBS) $(LUA_LIB) 18 | 19 | install: 20 | IF NOT EXIST $(LUA_LIBDIR)\luasql mkdir $(LUA_LIBDIR)\luasql 21 | copy src\$T.dll $(LUA_LIBDIR)\luasql 22 | 23 | clean: 24 | del src\$T.dll 25 | del src\$T.exp 26 | del src\$T.lib 27 | del $(OBJS) 28 | 29 | -------------------------------------------------------------------------------- /Makefile.win.mysql: -------------------------------------------------------------------------------- 1 | LUA_INC=c:\lua5.1\include 2 | LUA_DIR=c:\lua5.1\lua 3 | LUA_LIBDIR=c:\lua5.1 4 | LUA_LIB=c:\lua5.1\lua5.1.lib 5 | 6 | T=mysql 7 | 8 | DRIVER_INCLUDE= /I"c:\Program Files\MySQL\MySQL Server 5.0\include" 9 | DRIVER_LIBS= "C:\Program Files\MySQL\MySQL Server 5.0\lib\opt\libmySQL.lib" "C:\Program Files\MySQL\MySQL Server 5.0\lib\opt\mysqlclient.lib" 10 | 11 | OBJS= src\luasql.obj src\ls_$T.obj 12 | 13 | .c.obj: 14 | cl /c /Fo$@ /O2 /I$(LUA_INC) /DWIN32 /D_CRT_SECURE_NO_DEPRECATE $(DRIVER_INCLUDE) $< 15 | 16 | src\$T.dll: $(OBJS) 17 | link /dll /def:src\$T.def /out:$@ $(OBJS) $(DRIVER_LIBS) $(LUA_LIB) 18 | 19 | install: 20 | IF NOT EXIST $(LUA_LIBDIR)\luasql mkdir $(LUA_LIBDIR)\luasql 21 | copy src\$T.dll $(LUA_LIBDIR)\luasql 22 | 23 | clean: 24 | del src\$T.dll 25 | del src\$T.exp 26 | del src\$T.lib 27 | del $(OBJS) 28 | 29 | -------------------------------------------------------------------------------- /Makefile.win.odbc: -------------------------------------------------------------------------------- 1 | LUA_INC=c:\lua5.1\include 2 | LUA_DIR=c:\lua5.1\lua 3 | LUA_LIBDIR=c:\lua5.1 4 | LUA_LIB=c:\lua5.1\lua5.1.lib 5 | 6 | T=odbc 7 | 8 | DRIVER_INCLUDE= 9 | DRIVER_LIBS=odbc32.lib 10 | 11 | OBJS= src\luasql.obj src\ls_$T.obj 12 | 13 | .c.obj: 14 | cl /c /Fo$@ /O2 /I$(LUA_INC) /D_CRT_SECURE_NO_DEPRECATE $(DRIVER_INCLUDE) $< 15 | 16 | src\$T.dll: $(OBJS) 17 | link /dll /def:src\$T.def /out:$@ $(OBJS) $(DRIVER_LIBS) $(LUA_LIB) 18 | 19 | install: 20 | IF NOT EXIST $(LUA_LIBDIR)\luasql mkdir $(LUA_LIBDIR)\luasql 21 | copy src\$T.dll $(LUA_LIBDIR)\luasql 22 | 23 | clean: 24 | del src\$T.dll 25 | del src\$T.exp 26 | del src\$T.lib 27 | del $(OBJS) 28 | 29 | -------------------------------------------------------------------------------- /Makefile.win.sqlite3: -------------------------------------------------------------------------------- 1 | LUA_INC=c:\lua5.1\include 2 | LUA_DIR=c:\lua5.1\lua 3 | LUA_LIBDIR=c:\lua5.1 4 | LUA_LIB=c:\lua5.1\lua5.1.lib 5 | 6 | T=sqlite3 7 | 8 | DRIVER_INCLUDE= /I"c:\sqlite3" 9 | DRIVER_OBJ="c:\sqlite3\sqlite3.obj" 10 | 11 | OBJS= src\luasql.obj src\ls_$T.obj $(DRIVER_OBJ) 12 | 13 | .c.obj: 14 | cl /c /Fo$@ /O2 /MD /I$(LUA_INC) /DWIN32 /D_CRT_SECURE_NO_DEPRECATE $(DRIVER_INCLUDE) $< 15 | 16 | src\$T.dll: $(OBJS) 17 | link /dll /def:src\$T.def /out:$@ $(OBJS) $(LUA_LIB) 18 | 19 | install: 20 | IF NOT EXIST "$(LUA_LIBDIR)\luasql" mkdir "$(LUA_LIBDIR)\luasql" 21 | copy "src\$T.dll" "$(LUA_LIBDIR)\luasql" 22 | 23 | clean: 24 | del src\$T.dll 25 | del src\$T.exp 26 | del src\$T.lib 27 | del $(OBJS) 28 | 29 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | LuaSQL 2 | https://lunarmodules.github.io/luasql/ 3 | 4 | LuaSQL is a simple interface from Lua to a DBMS. It enables a Lua program to: 5 | 6 | * Connect to ODBC, ADO, Oracle, MySQL, SQLite, Firebird and PostgreSQL databases; 7 | * Execute arbitrary SQL statements; 8 | * Retrieve results in a row-by-row cursor fashion. 9 | 10 | LuaSQL is free software and uses the same license as Lua 5.1. 11 | 12 | 13 | Source code for LuaSQL can be downloaded from its GitHub repository. 14 | 15 | -------------------------------------------------------------------------------- /config: -------------------------------------------------------------------------------- 1 | # Installation directories 2 | 3 | # Default prefix 4 | PREFIX ?= /usr 5 | 6 | # Lua version and dirs 7 | LUA_SYS_VER ?= 5.2 8 | LUA_LIBDIR ?= $(PREFIX)/lib/lua/$(LUA_SYS_VER) 9 | LUA_DIR ?= $(PREFIX)/share/lua/$(LUA_SYS_VER) 10 | LUA_INC ?= $(PREFIX)/include/lua$(LUA_SYS_VER) 11 | 12 | # OS dependent 13 | UNAME_S := $(shell uname -s) 14 | ifeq ($(UNAME_S),Darwin) # MacOS 15 | LIB_OPTION ?= -bundle -undefined dynamic_lookup -mmacosx-version-min=10.3 16 | else # Linux/BSD 17 | LIB_OPTION ?= -shared 18 | endif 19 | 20 | # driver specific params 21 | # - MySQL 22 | #DRIVER_LIBS_mysql ?= -L/usr/local/mysql/lib -lmysqlclient -lz 23 | #DRIVER_INCS_mysql ?= -I/usr/local/mysql/include 24 | DRIVER_LIBS_mysql ?= -L/usr/lib -lmysqlclient -lz 25 | DRIVER_INCS_mysql ?= -I/usr/include/mysql 26 | # - Oracle OCI8 27 | DRIVER_LIBS_oci8 ?= -L/home/oracle/OraHome1/lib -lz -lclntsh 28 | DRIVER_INCS_oci8 ?= -I/home/oracle/OraHome1/rdbms/demo \ 29 | -I/home/oracle/OraHome1/rdbms/public 30 | # - PostgreSQL 31 | #DRIVER_LIBS_postgres ?= -L/usr/local/pgsql/lib -lpq 32 | #DRIVER_INCS_postgres ?= -I/usr/local/pgsql/include/ 33 | DRIVER_LIBS_postgres ?= -L/usr/lib -lpq 34 | DRIVER_INCS_postgres ?= -I/usr/include/postgresql 35 | # - SQLite 36 | DRIVER_LIBS_sqlite ?= -lsqlite 37 | DRIVER_INCS_sqlite ?= 38 | # - SQLite3 39 | DRIVER_LIBS_sqlite3 ?= -L/opt/local/lib -lsqlite3 40 | DRIVER_INCS_sqlite3 ?= -I/opt/local/include 41 | # - ODBC 42 | DRIVER_LIBS_odbc ?= -L/usr/local/lib -lodbc 43 | DRIVER_INCS_odbc ?= -DUNIXODBC -I/usr/local/include 44 | # - Firebird 45 | DRIVER_LIBS_firebird ?= -L/usr/local/firebird -lfbclient 46 | DRIVER_INCS_firebird ?= 47 | 48 | # general compilation parameters 49 | WARN= -fPIC $(OPTFLAGS) -Wmissing-prototypes -Wmissing-declarations -ansi -pedantic 50 | INCS = -I$(LUA_INC) 51 | DEFS = -std=gnu99 -fPIC 52 | CFLAGS=$(WARN) $(DRIVER_INCS) $(INCS) -DLUASQL_VERSION_NUMBER='"$V"' $(DEFS) 53 | CC= gcc 54 | -------------------------------------------------------------------------------- /doc/br/examples.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | LuaSQL: Conectividade de banco de dados para a linguagem de programação Lua 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 |
14 | 17 |
LuaSQL
18 |
Conectividade de banco de dados para a linguagem de programação Lua
19 |
20 | 21 |
22 | 23 | 41 | 42 |
43 | 44 |

Exemplos

45 | 46 |

Abaixo, você verá um pequeno exemplo do código do uso básico da biblioteca. 47 | Em seguida, outro exemplo mostra como criar um 48 | iterador sobre o resultado de uma determinada consulta.

49 | 50 | 51 |

Uso básico

52 |
 53 | -- carregar o driver
 54 | require "luasql.postgres"
 55 | -- criar o objeto de ambiente
 56 | env = assert (luasql.postgres())
 57 | -- conectar a base de dados
 58 | con = assert (env:connect("luasql-test"))
 59 | -- retornar a tabela
 60 | res = con:execute"DROP TABLE people"
 61 | res = assert (con:execute[[
 62 |   CREATE TABLE people (
 63 |     name  varchar(50),
 64 |     email varchar(50)
 65 |   )
 66 | ]])
 67 | -- adiciona alguns elementos
 68 | list = {
 69 |   { name="José das Couves", email="jose@couves.com", },
 70 |   { name="Manoel Joaquim", email="manoel.joaquim@cafundo.com", },
 71 |   { name="Maria das Dores", email="maria@dores.com", },
 72 | }
 73 | for i, p in pairs (list) do
 74 |   res = assert (con:execute(string.format([[
 75 |     INSERT INTO people
 76 |     VALUES ('%s', '%s')]], p.name, p.email)
 77 |   ))
 78 | end
 79 | -- obtem um cursor
 80 | cur = assert (con:execute"SELECT name, email from people")
 81 | -- imprime todos os registros, indexados pelos nomes de campos
 82 | row = cur:fetch ({}, "a")
 83 | while row do
 84 |   print(string.format("Nome: %s, E-mail: %s", row.name, row.email))
 85 |   -- reutiliza a tabela de resultados
 86 |   row = cur:fetch (row, "a")
 87 | end
 88 | -- fecha tudo
 89 | cur:close()
 90 | con:close()
 91 | env:close()
 92 | 
93 | 94 |

O resultado desse script será:

95 | 96 |
 97 | Nome: José das Couves, E-mail: jose@couves.com
 98 | Nome: Manoel Joaquim, E-mail: manoel.joaquim@cafundo.com
 99 | Nome: Maria das Dores, E-mail: maria@dores.com
100 | 
101 | 102 | 103 |

Uso do iterador

104 |

Pode ser útil oferecer um iterador para cada registro do resultado:

105 | 106 |
107 | function rows (connection, sql_statement)
108 |   local cursor = assert (connection:execute (sql_statement))
109 |   return function ()
110 |     return cursor:fetch()
111 |   end
112 | end
113 | 
114 | 115 |

Esse iterador é usado da seguinte forma:

116 | 117 |
118 | require "luasql.mysql"
119 | env = assert (luasql.mysql())
120 | con = assert (env:connect"my_db")
121 | for id, name, address in rows (con, "select * from contacts") do
122 |   print (string.format ("%s: %s", name, address))
123 | end
124 | 
125 | 126 |

Obviamente, o código acima só funciona se houver uma tabela chamadas contacts com as colunas apropriadas. 127 | No final do loop o objeto cursor será automaticamente fechado pelo driver, já que todo o resultado foi recuperado.

128 | 129 |

Objetos to-be-closed

130 | 131 |

132 | Nota de Compatibilidade: 133 | Variáveis To-be-closed é um recurso introduzido na versão 5.4 de Lua. Portanto, essa funcionalidade só pode ser usada se o driver LuaSQL (versão > 2.6) for compilado para a versão 5.4 ou superior de Lua. 134 |

135 | 136 |
137 | function getName(db, id)
138 |   -- Este código requer Lua 5.4 ou superior devido ao uso de variáveis to-be-closed
139 |   local cur <close> = db:execute("SELECT name FROM contacts WHERE id = " .. id)
140 |   return cur:fetch()
141 | end
142 | 
143 | 144 |
145 | 146 |
147 | 148 |
149 |

Valid XHTML 1.0!

150 |
151 | 152 |
153 | 154 | 155 | 156 | -------------------------------------------------------------------------------- /doc/br/history.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | LuaSQL: Conectividade de banco de dados para a linguagem de programação Lua 6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 |
15 | 18 |
LuaSQL
19 |
Conectividade de banco de dados para a linguagem de programação Lua
20 |
21 | 22 |
23 | 24 | 42 | 43 |
44 | 45 |

História

46 | 47 |
48 |
LuaSQL 2.7.0 [23/04/2025]
49 |
50 |
    51 |
  • Adaptação de todos os drivers para a versão 5.4 de Lua com suporte a variáveis to-be-closed
  • 52 |
  • Padronização da implementação do método :close() para retornar false seguido de uma string quando houver objetos relacionados ainda abertos.
  • 53 |
54 |
55 | 56 |
LuaSQL 2.6.1 [07/02/2024]
57 |
58 |
    59 |
  • Correção na compatibilidade do driver SQLite3 para versões anteriores a Lua 5.3 (agradecimento a Daniel McCarney)
  • 60 |
61 |
62 | 63 |
2.0.2 [26/06/2006]
64 |
Método numrows acrescentado ao driver MySQL.
65 | Adicionado um arquivo config para o makefile.
66 | Adicionada configuração do driver LinuxODBC.
67 | Corrigiu um bug no driver SQLite (bug encontrado por Mike Petersen).
68 | Corrigiu bugs nos drivers JDBC, OCI8 e ADO.
69 | Testes melhorados.
70 | Documentação melhorada.
71 |
72 | 73 |
2.0.1 [02/06/2005]
74 |
Corrigiu alguns erros relativos ao driver ODBC.
75 | 76 |
2.0.0 [22/03/2005]
77 |
Novo driver ADO e corrigiu alguns erros relativos ao driver ODBC.
78 | 79 |
2.0 beta 3 [23/12/2004]
80 |
Corrigiu apenas alguns pequenos erros.
81 | 82 |
2.0 beta 2 [26/11/2004]
83 |
Corrigiu alguns erros e introduziu os novos drivers SQLite and JDBC. 84 | Utiliza a 85 | proposta de pacotes 86 | para Lua 5.1. Veja mais detalhes em 87 | Instalação. 88 |
89 | 90 |
2.0 beta [10/12/2003]
91 |
92 | 93 | 94 |

95 | A versão 2.0 apresenta algumas modificações no design e aprimoramentos 96 | na implementação em relação à versão 1.0: 97 |

98 |
    99 |
  • Novo método de fetch: mais eficiente e mais flexível;
  • 100 |
  • Novo método de setautocommit;
  • 101 |
  • Compatível com Lua 5.0 e 5.1;
  • 102 |
  • Carregável dinamicamente ou estaticamente;
  • 103 |
  • Novos drivers para bancos de dados Oracle e MySQL.
  • 104 |
105 | 106 |

 

107 |

 

108 |

 

109 | 110 |
111 | 112 |
113 | 114 |
115 |

116 | Valid XHTML 1.0!

117 |

$Id: history.html,v 1.11 2008/06/11 00:26:13 jasonsantos Exp $ 118 |

119 |
120 |
121 | 122 | 123 | -------------------------------------------------------------------------------- /doc/br/index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | LuaSQL: Conectividade de banco de dados para a linguagem de programação Lua 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 |
14 | 17 |
LuaSQL
18 |
Conectividade de banco de dados para a linguagem de programação Lua
19 |
20 | 21 |
22 | 23 | 47 | 48 |
49 | 50 |

Visão Geral

51 | 52 |

53 | LuaSQL é uma interface simples entre Lua e um sistema gerenciador de banco de dados (DBMS). Ela permite que um programa Lua: 54 |

55 | 56 |
    57 |
  • Conecte-se aos bancos de dados ODBC, ADO, Oracle, MySQL, SQLite, JDBC e PostgreSQL;
  • 58 |
  • Execute comandos arbritários através de SQL;
  • 59 |
  • Recupere resultados no modo linha-a-linha de um cursor SQL.
  • 60 |
61 | 62 |

63 | LuaSQL é um software livre e utiliza a mesma licença 64 | de Lua 5.1. 65 |

66 | 67 |

Status

68 | 69 |

70 | A versão LuaSQL 2.7.0 (para Lua 5.X) está disponível para download. 71 | Para mais detalhes sobre as funcionalidades de cada versão, confira o histórico. 72 |

73 | 74 |

Download

75 |

76 | LuaSQL pode ser instalado via LuaRocks, usando 77 | o driver do banco de dados de sua escolha: 78 | 79 |

 80 | luarocks install luasql-firebird
 81 | luarocks install luasql-mysql
 82 | luarocks install luasql-oci8
 83 | luarocks install luasql-odbc
 84 | luarocks install luasql-postgres
 85 | luarocks install luasql-sqlite
 86 | luarocks install luasql-sqlite3
 87 | 
88 | 89 | O código fonte da LuaSQL pode ser baixado do seu repositório no GitHub. 90 |

91 | 92 |

Créditos

93 | 94 |

LuaSQL 2.x

95 | 96 |

97 | A versão 2.7 introduz suporte a variáveis To-be-closed além de adaptar todos os drivers para a versão 5.4 de Lua.
Esta versão foi implementada por Chaitanya Deshmukh durante o GSoC 2024 sob a orientação de Tomás Guisasola. 98 |

99 | 100 |

101 | A versão 2.5 incorpora suporte a busca no resultado no driver MySQL. 102 |

103 |

104 | A versão 2.3.5 incorpora algumas correções e pequenas melhorias (agradecimento a IR4T4 e tomatolog). 105 | Essa versão funciona com as versões 5.1, 5.2 and 5.3 de Lua. 106 |

107 |

108 | A versão 2.3 é apenas uma adaptação do código para funcionar com as versões 5.0, 5.1 e 5.2 de Lua. 109 |

110 |

111 | A partir da versão 2.2 começou o desenvolvimento distribuído com todas as discussões sobre o projeto acontecendo na lista de interesse do Projeto Kepler. 112 | Novos desenvolvedores: Hisham Muhammad, Ignacio Burgueño, Luis Eduardo Jason Santos, Marc Nijdam, Mauricio Bomfim and Scott Morgan. 113 |

114 |

LuaSQL 2.0 e 2.1

115 |

116 | A versão 2.0 foi redesenhada por Roberto Ierusalimschy, André Carregal 117 | e Tomás Guisasola como parte do 118 | Projeto Kepler. 119 | A implementação das versões 2.0 e 2.1 é compatível com Lua 5.0 e foi codificada 120 | por Tomás Guisasola, Eduardo Quintão, Thiago Ponte, Fabio Mascarenhas, Danilo Tuler, 121 | com inestimáveis contribuições de Michael Broughton, Pedro Maia, Klaus Ripke, Michael Roth, Tiago Dionizio e Leonardo Godinho. 122 |

123 | 124 |

LuaSQL 1.0

125 |

126 | LuaSQL foi projetado por Pedro Miller Rabinovitch e Roberto Ierusalimschy. 127 | A primeira implementação era compatível com Lua 4.0a. 128 | Muitas modificações foram feitas, mas não distribuídas, por Diego Nehab (ODBC), 129 | Carlos Cassino, Tomás Guisasola and Eduardo Quintão (PostgreSQL). 130 |

131 |

132 | O desenvolvimento da LuaSQL foi patrocinado pela 133 | Fábrica Digital, FINEP e CNPq. 134 |

135 | 136 |

Contato

137 | 138 |

139 | Para mais informações, entre em 140 | contato conosco. 141 | Comentários são muito bem-vindos! 142 |

143 | 144 |

145 | A lista de discussão 146 | do projeto Kepler é outra forma de entrar em contato com desenvolvedores 147 | e usuários da plataforma Kepler. 148 |

149 | 150 |
151 | 152 |
153 | 154 |
155 |

156 | Valid XHTML 1.0!

157 |

$Id: index.html,v 1.9 2008/06/11 00:26:13 jasonsantos Exp $ 158 |

159 |
160 | 161 |
162 | 163 | 164 | 165 | -------------------------------------------------------------------------------- /doc/br/license.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Licença LuaSQL 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 |
14 | 17 |
LuaSQL
18 |
Conectividade de banco de dados para a linguagem de programação Lua
19 |
20 | 21 |
22 | 23 | 62 | 63 |
64 |

License

65 | 66 |

LuaSQL is free software: 67 | it can be used for both academic and commercial purposes at absolutely no cost. 68 | There are no royalties or GNU-like "copyleft" restrictions. 69 | LuaSQL qualifies as 70 | Open Source 71 | software. 72 | Its licenses are compatible with 73 | GPL. 74 | LuaSQL is not in the public domain and the 75 | Kepler Project 76 | keep its copyright. 77 | The legal details are below.

78 | 79 |

The spirit of the license is that 80 | you are free to use LuaSQL for any purpose at no cost without having to ask us. 81 | The only requirement is that if you do use LuaSQL, 82 | then you should give us credit by including the appropriate copyright notice 83 | somewhere in your product or its documentation.

84 | 85 |

The LuaSQL library is designed and implemented by the 86 | Kepler Project team. 87 | The implementation is not derived from licensed software.

88 | 89 |
90 |

Copyright © 2003-2025 The Kepler Project.

91 | 92 |

Permission is hereby granted, free of charge, to any person obtaining a copy 93 | of this software and associated documentation files (the "Software"), to deal 94 | in the Software without restriction, including without limitation the rights 95 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 96 | copies of the Software, and to permit persons to whom the Software is 97 | furnished to do so, subject to the following conditions:

98 | 99 |

The above copyright notice and this permission notice shall be included in 100 | all copies or substantial portions of the Software.

101 | 102 |

103 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 104 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 105 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 106 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 107 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 108 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 109 | THE SOFTWARE.

110 | 111 |
112 |
113 | 114 |
115 |

Valid XHTML 1.0!

116 |

117 |

118 |
119 | 120 |
121 | 122 | 123 | -------------------------------------------------------------------------------- /doc/br/luasql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunarmodules/luasql/8cb68d084c7e9836724a644b8619ad342afc2794/doc/br/luasql.png -------------------------------------------------------------------------------- /doc/fr/doc.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin-left: 1em; 3 | margin-right: 1em; 4 | font-family: arial, helvetica, geneva, sans-serif; 5 | background-color:#ffffff; margin:0px; 6 | } 7 | 8 | code { 9 | font-family: "Andale Mono", monospace; 10 | } 11 | 12 | tt { 13 | font-family: "Andale Mono", monospace; 14 | } 15 | 16 | body, td, th { font-size: 11pt; } 17 | 18 | h1, h2, h3, h4 { margin-left: 0em; } 19 | 20 | textarea, pre, tt { font-size:10pt; } 21 | body, td, th { color:#000000; } 22 | small { font-size:0.85em; } 23 | h1 { font-size:1.5em; } 24 | h2 { font-size:1.25em; } 25 | h3 { font-size:1.15em; } 26 | h4 { font-size:1.06em; } 27 | 28 | a:link { font-weight:bold; color: #004080; text-decoration: none; } 29 | a:visited { font-weight:bold; color: #006699; text-decoration: none; } 30 | a:link:hover { text-decoration:underline; } 31 | hr { color:#cccccc } 32 | img { border-width: 0px; } 33 | 34 | h3 { padding-top: 1em; } 35 | 36 | p { margin-left: 1em; } 37 | 38 | p.name { 39 | font-family: "Andale Mono", monospace; 40 | padding-top: 1em; 41 | margin-left: 0em; 42 | } 43 | 44 | blockquote { margin-left: 3em; } 45 | 46 | .example { 47 | background-color: rgb(245, 245, 245); 48 | border-top-width: 1px; 49 | border-right-width: 1px; 50 | border-bottom-width: 1px; 51 | border-left-width: 1px; 52 | border-top-style: solid; 53 | border-right-style: solid; 54 | border-bottom-style: solid; 55 | border-left-style: solid; 56 | border-top-color: silver; 57 | border-right-color: silver; 58 | border-bottom-color: silver; 59 | border-left-color: silver; 60 | padding: 1em; 61 | margin-left: 1em; 62 | margin-right: 1em; 63 | font-family: "Andale Mono", monospace; 64 | font-size: smaller; 65 | } 66 | 67 | hr { 68 | margin-left: 0em; 69 | background: #00007f; 70 | border: 0px; 71 | height: 1px; 72 | } 73 | 74 | ul { list-style-type: disc; } 75 | 76 | table.index { border: 1px #00007f; } 77 | table.index td { text-align: left; vertical-align: top; } 78 | table.index ul { padding-top: 0em; margin-top: 0em; } 79 | 80 | table { 81 | border: 1px solid black; 82 | border-collapse: collapse; 83 | margin-left: auto; 84 | margin-right: auto; 85 | } 86 | 87 | th { 88 | border: 1px solid black; 89 | padding: 0.5em; 90 | } 91 | 92 | td { 93 | border: 1px solid black; 94 | padding: 0.5em; 95 | } 96 | div.header, div.footer { margin-left: 0em; } 97 | 98 | #container { 99 | margin-left: 1em; 100 | margin-right: 1em; 101 | background-color: #f0f0f0; 102 | } 103 | 104 | #product { 105 | text-align: center; 106 | border-bottom: 1px solid #cccccc; 107 | background-color: #ffffff; 108 | } 109 | 110 | #product big { 111 | font-size: 2em; 112 | } 113 | 114 | #product_logo { 115 | } 116 | 117 | #product_name { 118 | } 119 | 120 | #product_description { 121 | } 122 | 123 | #main { 124 | background-color: #f0f0f0; 125 | border-left: 2px solid #cccccc; 126 | } 127 | 128 | #navigation { 129 | float: left; 130 | width: 12em; 131 | margin: 0; 132 | vertical-align: top; 133 | background-color: #f0f0f0; 134 | overflow:visible; 135 | } 136 | 137 | #navigation h1 { 138 | background-color:#e7e7e7; 139 | font-size:1.1em; 140 | color:#000000; 141 | text-align:left; 142 | margin:0px; 143 | padding:0.2em; 144 | border-top:1px solid #dddddd; 145 | border-bottom:1px solid #dddddd; 146 | } 147 | 148 | #navigation ul { 149 | font-size:1em; 150 | list-style-type: none; 151 | padding: 0; 152 | margin: 1px; 153 | } 154 | 155 | #navigation li { 156 | text-indent: -1em; 157 | margin: 0em 0em 0em 0.5em; 158 | display: block; 159 | padding: 3px 0px 0px 12px; 160 | } 161 | 162 | #navigation li li a { 163 | padding: 0px 3px 0px -1em; 164 | } 165 | 166 | #content { 167 | margin-left: 12em; 168 | padding: 1em; 169 | border-left: 2px solid #cccccc; 170 | border-right: 2px solid #cccccc; 171 | background-color: #ffffff; 172 | } 173 | 174 | #about { 175 | clear: both; 176 | margin: 0; 177 | padding: 5px; 178 | border-top: 2px solid #cccccc; 179 | background-color: #ffffff; 180 | } 181 | 182 | @media print { 183 | body { 184 | font: 10pt "Times New Roman", "TimeNR", Times, serif; 185 | } 186 | a { 187 | font-weight:bold; color: #004080; text-decoration: underline; 188 | } 189 | #main { 190 | background-color: #ffffff; border-left: 0px; 191 | } 192 | #container { 193 | margin-left: 2%; margin-right: 2%; background-color: #ffffff; 194 | } 195 | #content { 196 | margin-left: 0px; padding: 1em; border-left: 0px; border-right: 0px; background-color: #ffffff; 197 | } 198 | #navigation { 199 | display: none; 200 | } 201 | #product_logo { 202 | display: none; 203 | } 204 | #about img { 205 | display: none; 206 | } 207 | .example { 208 | font-family: "Andale Mono", monospace; 209 | font-size: 8pt; 210 | page-break-inside: avoid; 211 | } 212 | } 213 | -------------------------------------------------------------------------------- /doc/fr/examples.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | LuaSQL: Database connectivity for the Lua programming language 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 |
14 | 17 |
LuaSQL
18 |
Database connectivity for the Lua programming language
19 |
20 | 21 |
22 | 23 | 62 | 63 |
64 | 65 |

Examples

66 | 67 |

Here is an example of the basic use of the library. 68 | After that, another example shows how to create an 69 | iterator over the result of a SELECT 70 | query.

71 | 72 | 73 |

Basic use

74 |
 75 | -- load driver
 76 | local driver = require "luasql.postgres"
 77 | -- create environment object
 78 | env = assert (driver.postgres())
 79 | -- connect to data source
 80 | con = assert (env:connect("luasql-test"))
 81 | -- reset our table
 82 | res = con:execute"DROP TABLE people"
 83 | res = assert (con:execute[[
 84 |   CREATE TABLE people(
 85 |     name  varchar(50),
 86 |     email varchar(50)
 87 |   )
 88 | ]])
 89 | -- add a few elements
 90 | list = {
 91 |   { name="Jose das Couves", email="jose@couves.com", },
 92 |   { name="Manoel Joaquim", email="manoel.joaquim@cafundo.com", },
 93 |   { name="Maria das Dores", email="maria@dores.com", },
 94 | }
 95 | for i, p in pairs (list) do
 96 |   res = assert (con:execute(string.format([[
 97 |     INSERT INTO people
 98 |     VALUES ('%s', '%s')]], p.name, p.email)
 99 |   ))
100 | end
101 | -- retrieve a cursor
102 | cur = assert (con:execute"SELECT name, email from people")
103 | -- print all rows, the rows will be indexed by field names
104 | row = cur:fetch ({}, "a")
105 | while row do
106 |   print(string.format("Name: %s, E-mail: %s", row.name, row.email))
107 |   -- reusing the table of results
108 |   row = cur:fetch (row, "a")
109 | end
110 | -- close everything
111 | cur:close() -- already closed because all the result set was consumed
112 | con:close()
113 | env:close()
114 | 
115 | 116 |

And the output of this script should be:

117 | 118 |
119 | Name: Jose das Couves, E-mail: jose@couves.com
120 | Name: Manoel Joaquim, E-mail: manoel.joaquim@cafundo.com
121 | Name: Maria das Dores, E-mail: maria@dores.com
122 | 
123 | 124 | 125 |

Iterator

126 |

It may be useful to offer an iterator for the resulting rows:

127 | 128 |
129 | function rows (connection, sql_statement)
130 |   local cursor = assert (connection:execute (sql_statement))
131 |   return function ()
132 |     return cursor:fetch()
133 |   end
134 | end
135 | 
136 | 137 |

Here is how the iterator is used:

138 | 139 |
140 | env = assert (require"luasql.mysql".mysql())
141 | con = assert (env:connect"my_db")
142 | for id, name, address in rows (con, "select * from contacts") do
143 |   print (string.format ("%s: %s", name, address))
144 | end
145 | 
146 | 147 |

Obviously, the code above only works if there is a table called contacts with the columns id, name and address in this order. At the end of the loop the cursor will be automatically closed by the driver.

148 | 149 |

To-be-closed Objects

150 | 151 |

152 | Compatibility Note: 153 | To-be-closed variables is a feature introduced in Lua 5.4. Therefore, this functionality can only be used if LuaSQL (version > 2.6) is compiled against Lua version 5.4 or higher. 154 |

155 | 156 |
157 | function getName(db, id)
158 |   -- This code requires Lua 5.4 or higher due to the use of to-be-closed variables.
159 |   local cur <close> = db:execute("SELECT name FROM contacts WHERE id = " .. id)
160 |   return cur:fetch()
161 | end
162 | 
163 | 164 |
165 | 166 |
167 | 168 |
169 |

Valid XHTML 1.0!

170 |

$Id: examples.html,v 1.16 2008/06/11 00:26:13 jasonsantos Exp $

171 |
172 | 173 |
174 | 175 | 176 | 177 | -------------------------------------------------------------------------------- /doc/fr/index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | LuaSQL: Connection au base de donnée pour le language de programmation Lua 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 |
14 | 17 |
LuaSQL
18 |
Connection au base de donnée pour le language de programmation Lua
19 |
20 | 21 |
22 | 23 | 61 | 62 |
63 | 64 |

Overview

65 | 66 |

67 | LuaSQL est une simple interface de Lua à DBMS. Cela permet à un programme Lua de : 68 |

69 | 70 |
    71 |
  • Connect to ODBC, ADO, Oracle, MySQL, SQLite, Firebird and PostgreSQL databases;
  • 72 |
  • Execute arbitrary SQL statements;
  • 73 |
  • Retrieve results in a row-by-row cursor fashion.
  • 74 |
75 | 76 |

77 | LuaSQL is free software and uses the same license 78 | as Lua 5.1. 79 |

80 | 81 |

Status

82 | 83 |

84 | LuaSQL version 2.3.0 (for Lua 5.X) is now available for download. 85 | For more details on the features list please check the product 86 | history. 87 |

88 | 89 | 90 |

Download

91 |

92 | LuaSQL peut être installé via LuaRocks. 93 | Choissisez le moteur pour votre base de données: 94 | 95 |

 96 | luarocks install luasql-sqlite3
 97 | luarocks install luasql-postgres
 98 | luarocks install luasql-mysql
 99 | luarocks install luasql-sqlite
100 | luarocks install luasql-odbc
101 | 
102 | Le code source pour LuaSQL peut être téléchargé de son dépôt à GitHub. 104 |

105 | 106 |

Credits

107 | 108 |

LuaSQL 2.x

109 |

110 | Version 2.3 is just an adaptation of the code to work with Lua 5.0, 5.1 and 5.2. 111 |

112 |

113 | Version 2.2 started a distributed development, with all project discussions happening through Kepler's mailing list. 114 | New developers: Hisham Muhammad, Ignacio Burgueño, Luis Eduardo Jason Santos, Marc Nijdam, Mauricio Bomfim and Scott Morgan. 115 |

116 | Version 2.1 and 2.0 were redesigned by Roberto Ierusalimschy, André Carregal 117 | and Tomás Guisasola as part of the 118 | Kepler Project. 119 | The implementation was coded by 120 | Tomás Guisasola, Eduardo Quintão, Thiago Ponte, Fabio Mascarenhas and 121 | Danilo Tuler, with many contributions from Michael Broughton, Tiago Dionizio, Leonardo Godinho, Pedro Maia, Klaus Ripke, Michael Roth and others.

122 | 123 |

LuaSQL 1.0

124 | 125 |

LuaSQL was originally designed by Pedro Miller Rabinovitch and Roberto Ierusalimschy. 126 | The first implementation was compatible with Lua 4.0a. 127 | Many modifications were made but not distributed by Diego Nehab (ODBC), 128 | Carlos Cassino, Tomás Guisasola and Eduardo Quintão (PostgreSQL).

129 | 130 |

LuaSQL development was sponsored by 131 | Fábrica Digital, FINEP and CNPq.

132 | 133 |

Contact us

134 | 135 |

For more information please contact us. 136 | Comments are welcome!

137 | 138 |

You can also reach other Kepler developers and users on the Kepler Project 139 | mailing list.

140 | 141 |
142 | 143 |
144 | 145 |
146 |

Valid XHTML 1.0!

147 |

$Id: index.html,v 1.27 2008/06/11 00:26:13 jasonsantos Exp $

148 |
149 | 150 |
151 | 152 | 153 | 154 | -------------------------------------------------------------------------------- /doc/fr/license.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | LuaSQL License 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 |
14 | 17 |
LuaSQL
18 |
Database connectivity for the Lua programming language
19 |
20 | 21 |
22 | 61 | 62 |
63 |

License

64 | 65 |

LuaSQL is free software: 66 | it can be used for both academic and commercial purposes at absolutely no cost. 67 | There are no royalties or GNU-like "copyleft" restrictions. 68 | LuaSQL qualifies as 69 | Open Source 70 | software. 71 | Its licenses are compatible with 72 | GPL. 73 | LuaSQL is not in the public domain and the 74 | Kepler Project 75 | keep its copyright. 76 | The legal details are below.

77 | 78 |

The spirit of the license is that 79 | you are free to use LuaSQL for any purpose at no cost without having to ask us. 80 | The only requirement is that if you do use LuaSQL, 81 | then you should give us credit by including the appropriate copyright notice 82 | somewhere in your product or its documentation.

83 | 84 |

The LuaSQL library is designed and implemented by the 85 | Kepler Project team. 86 | The implementation is not derived from licensed software.

87 | 88 |
89 |

Copyright © 2003-2007 The Kepler Project.

90 | 91 |

Permission is hereby granted, free of charge, to any person obtaining a copy 92 | of this software and associated documentation files (the "Software"), to deal 93 | in the Software without restriction, including without limitation the rights 94 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 95 | copies of the Software, and to permit persons to whom the Software is 96 | furnished to do so, subject to the following conditions:

97 | 98 |

The above copyright notice and this permission notice shall be included in 99 | all copies or substantial portions of the Software.

100 | 101 |

102 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 103 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 104 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 105 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 106 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 107 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 108 | THE SOFTWARE.

109 | 110 |
111 |
112 | 113 |
114 |

Valid XHTML 1.0!

115 |

$Id: license.html,v 1.17 2008/06/11 00:26:13 jasonsantos Exp $

116 |
117 | 118 |
119 | 120 | 121 | -------------------------------------------------------------------------------- /doc/fr/luasql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunarmodules/luasql/8cb68d084c7e9836724a644b8619ad342afc2794/doc/fr/luasql.png -------------------------------------------------------------------------------- /doc/us/doc.css: -------------------------------------------------------------------------------- 1 | body { 2 | color: #47555c; 3 | font-size: 16px; 4 | font-family: "Open Sans", sans-serif; 5 | margin: 0; 6 | padding: 0; 7 | background: #eff4ff; 8 | } 9 | 10 | a:link { color: #008fee; } 11 | a:visited { color: #008fee; } 12 | a:hover { color: #22a7ff; } 13 | 14 | h1 { font-size:26px; } 15 | h2 { font-size:24px; } 16 | h3 { font-size:18px; } 17 | h4 { font-size:16px; } 18 | 19 | hr { 20 | height: 1px; 21 | background: #c1cce4; 22 | border: 0px; 23 | margin: 20px 0; 24 | } 25 | 26 | code { 27 | font-family: "Open Sans Mono", "Andale Mono", monospace; 28 | } 29 | 30 | tt { 31 | font-family: "Open Sans Mono", "Andale Mono", monospace; 32 | } 33 | 34 | body, td, th { 35 | } 36 | 37 | textarea, pre, tt { 38 | font-family: "Open Sans Mono", "Andale Mono", monospace; 39 | } 40 | 41 | img { 42 | border-width: 0px; 43 | } 44 | 45 | .example { 46 | background-color: #323744; 47 | color: white; 48 | font-size: 16px; 49 | padding: 16px 24px; 50 | border-radius: 2px; 51 | overflow-x: auto; 52 | } 53 | 54 | div.header, div.footer { 55 | } 56 | 57 | #container { 58 | } 59 | 60 | #product { 61 | background-color: white; 62 | padding: 10px; 63 | height: 130px; 64 | border-bottom: solid #d3dbec 1px; 65 | } 66 | 67 | #product big { 68 | font-size: 42px; 69 | } 70 | #product strong { 71 | font-weight: normal; 72 | } 73 | 74 | #product_logo { 75 | float: right; 76 | } 77 | 78 | #product_name { 79 | padding-top: 15px; 80 | padding-left: 30px; 81 | font-size: 42px; 82 | font-weight: normal; 83 | } 84 | 85 | #product_description { 86 | padding-left: 30px; 87 | color: #757779; 88 | } 89 | 90 | #main { 91 | background: #eff4ff; 92 | margin: 0; 93 | } 94 | 95 | #navigation { 96 | width: 100%; 97 | background-color: rgb(44,62,103); 98 | padding: 10px; 99 | margin: 0; 100 | } 101 | 102 | #navigation h1 { 103 | display: none; 104 | } 105 | 106 | #navigation a:hover { 107 | text-decoration: underline; 108 | } 109 | 110 | #navigation ul li a { 111 | color: rgb(136, 208, 255); 112 | font-weight: bold; 113 | text-decoration: none; 114 | } 115 | 116 | #navigation ul li li a { 117 | color: rgb(136, 208, 255); 118 | font-weight: normal; 119 | text-decoration: none; 120 | } 121 | 122 | #navigation ul { 123 | display: inline; 124 | color: white; 125 | padding: 0px; 126 | padding-top: 10px; 127 | padding-bottom: 10px; 128 | } 129 | 130 | #navigation li { 131 | display: inline; 132 | list-style-type: none; 133 | padding-left: 5px; 134 | padding-right: 5px; 135 | } 136 | 137 | #navigation li { 138 | padding: 10px; 139 | padding: 10px; 140 | } 141 | 142 | #navigation li li { 143 | } 144 | 145 | #navigation li:hover a { 146 | color: rgb(166, 238, 255); 147 | } 148 | 149 | #content { 150 | padding: 20px; 151 | width: 800px; 152 | margin-left: auto; 153 | margin-right: auto; 154 | } 155 | 156 | #about { 157 | display: none; 158 | } 159 | 160 | dl.reference { 161 | background-color: white; 162 | padding-left: 20px; 163 | padding-right: 20px; 164 | padding-bottom: 20px; 165 | border: solid #d3dbec 1px; 166 | } 167 | 168 | dl.reference dt { 169 | padding: 5px; 170 | padding-top: 25px; 171 | color: #637bbc; 172 | } 173 | 174 | dl.reference dl dt { 175 | padding-top: 5px; 176 | color: #637383; 177 | } 178 | 179 | dl.reference dd { 180 | } 181 | 182 | @media print { 183 | body { 184 | font: 10pt "Times New Roman", "TimeNR", Times, serif; 185 | } 186 | a { 187 | font-weight:bold; color: #004080; text-decoration: underline; 188 | } 189 | #main { 190 | background-color: #ffffff; border-left: 0px; 191 | } 192 | #container { 193 | margin-left: 2%; margin-right: 2%; background-color: #ffffff; 194 | } 195 | #content { 196 | margin-left: 0px; padding: 1em; border-left: 0px; border-right: 0px; background-color: #ffffff; 197 | } 198 | #navigation { 199 | display: none; 200 | } 201 | #product_logo { 202 | display: none; 203 | } 204 | #about img { 205 | display: none; 206 | } 207 | .example { 208 | font-family: "Andale Mono", monospace; 209 | font-size: 8pt; 210 | page-break-inside: avoid; 211 | } 212 | } 213 | -------------------------------------------------------------------------------- /doc/us/examples.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | LuaSQL: Database connectivity for the Lua programming language 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 |
14 | 17 |
LuaSQL
18 |
Database connectivity for the Lua programming language
19 |
20 | 21 |
22 | 23 | 41 | 42 |
43 | 44 |

Examples

45 | 46 |

Here is an example of the basic use of the library. 47 | After that, another example shows how to create an 48 | iterator over the result of a SELECT 49 | query.

50 | 51 | 52 |

Basic use

53 |
 54 | -- load driver
 55 | local driver = require "luasql.postgres"
 56 | -- create environment object
 57 | env = assert (driver.postgres())
 58 | -- connect to data source
 59 | con = assert (env:connect("luasql-test"))
 60 | -- reset our table
 61 | res = con:execute"DROP TABLE people"
 62 | res = assert (con:execute[[
 63 |   CREATE TABLE people(
 64 |     name  varchar(50),
 65 |     email varchar(50)
 66 |   )
 67 | ]])
 68 | -- add a few elements
 69 | list = {
 70 |   { name="Jose das Couves", email="jose@couves.com", },
 71 |   { name="Manoel Joaquim", email="manoel.joaquim@cafundo.com", },
 72 |   { name="Maria das Dores", email="maria@dores.com", },
 73 | }
 74 | for i, p in pairs (list) do
 75 |   res = assert (con:execute(string.format([[
 76 |     INSERT INTO people
 77 |     VALUES ('%s', '%s')]], p.name, p.email)
 78 |   ))
 79 | end
 80 | -- retrieve a cursor
 81 | cur = assert (con:execute"SELECT name, email from people")
 82 | -- print all rows, the rows will be indexed by field names
 83 | row = cur:fetch ({}, "a")
 84 | while row do
 85 |   print(string.format("Name: %s, E-mail: %s", row.name, row.email))
 86 |   -- reusing the table of results
 87 |   row = cur:fetch (row, "a")
 88 | end
 89 | -- close everything
 90 | cur:close() -- already closed because all the result set was consumed
 91 | con:close()
 92 | env:close()
 93 | 
94 | 95 |

And the output of this script should be:

96 | 97 |
 98 | Name: Jose das Couves, E-mail: jose@couves.com
 99 | Name: Manoel Joaquim, E-mail: manoel.joaquim@cafundo.com
100 | Name: Maria das Dores, E-mail: maria@dores.com
101 | 
102 | 103 | 104 |

Iterator

105 |

It may be useful to offer an iterator for the resulting rows:

106 | 107 |
108 | function rows (connection, sql_statement)
109 |   local cursor = assert (connection:execute (sql_statement))
110 |   return function ()
111 |     return cursor:fetch()
112 |   end
113 | end
114 | 
115 | 116 |

Here is how the iterator is used:

117 | 118 |
119 | env = assert (require"luasql.mysql".mysql())
120 | con = assert (env:connect"my_db")
121 | for id, name, address in rows (con, "select * from contacts") do
122 |   print (string.format ("%s: %s", name, address))
123 | end
124 | 
125 | 126 |

Obviously, the code above only works if there is a table called contacts with the columns id, name and address in this order. At the end of the loop the cursor will be automatically closed by the driver.

127 | 128 |

To-be-closed Objects

129 | 130 |

131 | Compatibility Note: 132 | To-be-closed variables is a feature introduced in Lua 5.4. Therefore, this functionality can only be used if LuaSQL (version > 2.6) is compiled against Lua version 5.4 or higher. 133 |

134 | 135 |
136 | function getName(db, id)
137 |   -- This code requires Lua 5.4 or higher due to the use of to-be-closed variables.
138 |   local cur <close> = db:execute("SELECT name FROM contacts WHERE id = " .. id)
139 |   return cur:fetch()
140 | end
141 | 
142 | 143 |
144 | 145 |
146 | 147 |
148 |

Valid XHTML 1.0!

149 |
150 | 151 |
152 | 153 | 154 | 155 | -------------------------------------------------------------------------------- /doc/us/index.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | LuaSQL: Database connectivity for the Lua programming language 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 |
14 | 17 |
LuaSQL
18 |
Database connectivity for the Lua programming language
19 |
20 | 21 |
22 | 23 | 47 | 48 |
49 | 50 |

Overview

51 | 52 |

53 | LuaSQL is a simple interface from Lua to a DBMS. It enables a Lua program to: 54 |

55 | 56 |
    57 |
  • Connect to ODBC, ADO, Oracle, MySQL, SQLite, Firebird and PostgreSQL databases;
  • 58 |
  • Execute arbitrary SQL statements;
  • 59 |
  • Retrieve results in a row-by-row cursor fashion.
  • 60 |
61 | 62 |

63 | LuaSQL is free software and uses the same license 64 | as Lua 5.1. 65 |

66 | 67 |

Status

68 | 69 |

70 | LuaSQL version 2.7.0 (for Lua 5.X) is now available for download. 71 | For more details on the features list please check the product 72 | history. 73 |

74 | 75 |

Download

76 |

77 | LuaSQL can be installed via LuaRocks, using the 78 | driver for your database of choice: 79 | 80 |

 81 | luarocks install luasql-firebird
 82 | luarocks install luasql-mysql
 83 | luarocks install luasql-oci8
 84 | luarocks install luasql-odbc
 85 | luarocks install luasql-postgres
 86 | luarocks install luasql-sqlite
 87 | luarocks install luasql-sqlite3
 88 | 
89 | 90 | Source code for LuaSQL can be downloaded from its GitHub repository. 91 |

92 | 93 |

Credits

94 | 95 |

LuaSQL 2.x

96 | 97 |

98 | Version 2.7 introduces support for To-be-closed variables and all the Drivers are adapted to Lua version 5.4.
This was developed by Chaitanya Deshmukh (GSoC 2024) under the mentorship of Tomás Guisasola. 99 |

100 | 101 |

102 | Version 2.5 incorporates support in MySQL driver for seeking in the result set. 103 |

104 |

105 | Version 2.3.5 incorporates some bug corrections and small improvements (thanks to IR4T4 and tomatolog). 106 | This version works with Lua versions 5.1, 5.2 and 5.3. 107 |

108 |

109 | Version 2.3 is just an adaptation of the code to work with Lua 5.0, 5.1 and 5.2. 110 |

111 |

112 | Version 2.2 started a distributed development, with all project discussions happening through the Kepler's mailing list. 113 | New developers: Hisham Muhammad, Ignacio Burgueño, Luis Eduardo Jason Santos, Marc Nijdam, Mauricio Bomfim and Scott Morgan. 114 |

115 | Version 2.1 and 2.0 were redesigned by Roberto Ierusalimschy, André Carregal 116 | and Tomás Guisasola as part of the 117 | Kepler Project. 118 | The implementation was coded by 119 | Tomás Guisasola, Eduardo Quintão, Thiago Ponte, Fabio Mascarenhas and 120 | Danilo Tuler, with many contributions from Michael Broughton, Tiago Dionizio, Leonardo Godinho, Pedro Maia, Klaus Ripke, Michael Roth and others.

121 | 122 |

LuaSQL 1.0

123 | 124 |

LuaSQL was originally designed by Pedro Miller Rabinovitch and Roberto Ierusalimschy. 125 | The first implementation was compatible with Lua 4.0a. 126 | Many modifications were made but not distributed by Diego Nehab (ODBC), 127 | Carlos Cassino, Tomás Guisasola and Eduardo Quintão (PostgreSQL).

128 | 129 |

LuaSQL development was sponsored by 130 | Fábrica Digital, FINEP and CNPq.

131 | 132 |

Contact us

133 | 134 |

For more information please contact us. 135 | Comments are welcome!

136 | 137 |

You can also reach other Kepler developers and users on the Kepler Project 138 | mailing list.

139 | 140 |
141 | 142 |
143 | 144 |
145 |

Valid XHTML 1.0!

146 |
147 | 148 |
149 | 150 | 151 | 152 | -------------------------------------------------------------------------------- /doc/us/license.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | LuaSQL License 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 |
14 | 17 |
LuaSQL
18 |
Database connectivity for the Lua programming language
19 |
20 | 21 |
22 | 40 | 41 |
42 |

License

43 | 44 |

LuaSQL is free software: 45 | it can be used for both academic and commercial purposes at absolutely no cost. 46 | There are no royalties or GNU-like "copyleft" restrictions. 47 | LuaSQL qualifies as 48 | Open Source 49 | software. 50 | Its licenses are compatible with 51 | GPL. 52 | LuaSQL is not in the public domain and the 53 | Kepler Project 54 | keep its copyright. 55 | The legal details are below.

56 | 57 |

The spirit of the license is that 58 | you are free to use LuaSQL for any purpose at no cost without having to ask us. 59 | The only requirement is that if you do use LuaSQL, 60 | then you should give us credit by including the appropriate copyright notice 61 | somewhere in your product or its documentation.

62 | 63 |

The LuaSQL library is designed and implemented by the 64 | Kepler Project team. 65 | The implementation is not derived from licensed software.

66 | 67 |
68 |

Copyright © 2003-2025 The Kepler Project.

69 | 70 |

Permission is hereby granted, free of charge, to any person obtaining a copy 71 | of this software and associated documentation files (the "Software"), to deal 72 | in the Software without restriction, including without limitation the rights 73 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 74 | copies of the Software, and to permit persons to whom the Software is 75 | furnished to do so, subject to the following conditions:

76 | 77 |

The above copyright notice and this permission notice shall be included in 78 | all copies or substantial portions of the Software.

79 | 80 |

81 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 82 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 83 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 84 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 85 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 86 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 87 | THE SOFTWARE.

88 | 89 |
90 |
91 | 92 |
93 |

Valid XHTML 1.0!

94 |
95 | 96 |
97 | 98 | 99 | -------------------------------------------------------------------------------- /doc/us/luasql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunarmodules/luasql/8cb68d084c7e9836724a644b8619ad342afc2794/doc/us/luasql.png -------------------------------------------------------------------------------- /rockspec/luasql-firebird-2.4.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Firebird" 2 | version = "2.4.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.4.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Firebird driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://keplerproject.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | FB = { 22 | header = "ibase.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.firebird"] = { 29 | sources = { "src/luasql.c", "src/ls_firebird.c" }, 30 | libraries = { "fbclient" }, 31 | incdirs = { "$(FB_INCDIR)" }, 32 | libdirs = { "$(FB_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-firebird-2.5.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Firebird" 2 | version = "2.5.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "2.5.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Firebird driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://keplerproject.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | FB = { 22 | header = "ibase.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.firebird"] = { 29 | sources = { "src/luasql.c", "src/ls_firebird.c" }, 30 | libraries = { "fbclient" }, 31 | incdirs = { "$(FB_INCDIR)" }, 32 | libdirs = { "$(FB_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-firebird-2.6.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Firebird" 2 | version = "2.6.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Firebird driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://keplerproject.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | FB = { 22 | header = "ibase.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.firebird"] = { 29 | sources = { "src/luasql.c", "src/ls_firebird.c" }, 30 | libraries = { "fbclient" }, 31 | incdirs = { "$(FB_INCDIR)" }, 32 | libdirs = { "$(FB_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-firebird-2.6.0-2.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Firebird" 2 | version = "2.6.0-2" 3 | source = { 4 | url = "git+https://github.com/keplerproject/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Firebird driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://keplerproject.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | FB = { 22 | header = "ibase.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.firebird"] = { 29 | sources = { "src/luasql.c", "src/ls_firebird.c" }, 30 | libraries = { "fbclient" }, 31 | incdirs = { "$(FB_INCDIR)" }, 32 | libdirs = { "$(FB_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-firebird-2.6.0-3.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Firebird" 2 | version = "2.6.0-3" 3 | source = { 4 | url = "git+https://github.com/lunarmodules/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Firebird driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "https://lunarmodules.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | FB = { 22 | header = "ibase.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.firebird"] = { 29 | sources = { "src/luasql.c", "src/ls_firebird.c" }, 30 | libraries = { "fbclient" }, 31 | incdirs = { "$(FB_INCDIR)" }, 32 | libdirs = { "$(FB_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-firebird-2.7.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Firebird" 2 | version = "2.7.0-1" 3 | source = { 4 | url = "git+https://github.com/lunarmodules/luasql.git", 5 | branch = "2.7.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Firebird driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "https://lunarmodules.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | FB = { 22 | header = "ibase.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.firebird"] = { 29 | sources = { "src/luasql.c", "src/ls_firebird.c" }, 30 | libraries = { "fbclient" }, 31 | incdirs = { "$(FB_INCDIR)" }, 32 | libdirs = { "$(FB_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-mysql-2.2.0rc1-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-MySQL" 2 | version = "2.2.0rc1-1" 3 | source = { 4 | url = "http://luasql.luaforge.net/luasql-2.2.0rc1.tar.gz", 5 | } 6 | description = { 7 | summary = "Database connectivity for Lua (MySQL driver)", 8 | detailed = [[ 9 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 10 | Lua program to connect to databases, execute arbitrary SQL statements 11 | and retrieve results in a row-by-row cursor fashion. 12 | ]], 13 | license = "MIT/X11", 14 | homepage = "http://www.keplerproject.org/luasql/" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | external_dependencies = { 20 | MYSQL = { 21 | header = "mysql/mysql.h" 22 | } 23 | } 24 | build = { 25 | type = "make", 26 | variables = { 27 | T="mysql", 28 | LIB_OPTION = "$(LIBFLAG) -L$(MYSQL_LIBDIR) -lmysqlclient -lz -lcrypt -lnsl -lm", 29 | CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) -I$(MYSQL_INCDIR)/mysql" 30 | }, 31 | build_variables = { 32 | DRIVER_LIBS="", 33 | }, 34 | install_variables = { 35 | LUA_LIBDIR = "$(LIBDIR)", 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /rockspec/luasql-mysql-2.2.0rc1-2.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-MySQL" 2 | version = "2.2.0rc1-2" 3 | source = { 4 | url = "http://luasql.luaforge.net/luasql-2.2.0rc1.tar.gz", 5 | } 6 | description = { 7 | summary = "Database connectivity for Lua (MySQL driver)", 8 | detailed = [[ 9 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 10 | Lua program to connect to databases, execute arbitrary SQL statements 11 | and retrieve results in a row-by-row cursor fashion. 12 | ]], 13 | license = "MIT/X11", 14 | homepage = "http://www.keplerproject.org/luasql/" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | external_dependencies = { 20 | MYSQL = { 21 | header = "mysql/mysql.h" 22 | }, 23 | OPENSSL = { 24 | header = "openssl/crypto.h" 25 | }, 26 | ZLIB = { 27 | header = "zlib.h" 28 | } 29 | } 30 | build = { 31 | type = "make", 32 | variables = { 33 | T="mysql", 34 | LIB_OPTION = "$(LIBFLAG) -L$(MYSQL_LIBDIR) -L$(MYSQL_LIBDIR)/mysql -lmysqlclient -L$(ZLIB_LIBDIR) -lz -L$(OPENSSL_LIBDIR) -lcrypt -lnsl -lm", 35 | CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) -I$(MYSQL_INCDIR)/mysql -I$(OPENSSL_INCDIR)/openssl -I$(ZLIB_INCDIR)" 36 | }, 37 | build_variables = { 38 | DRIVER_LIBS="", 39 | }, 40 | install_variables = { 41 | LUA_LIBDIR = "$(LIBDIR)", 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /rockspec/luasql-mysql-2.3.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-MySQL" 2 | version = "2.3.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (MySQL driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | MYSQL = { 22 | header = "mysql.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.mysql"] = { 29 | sources = { "src/luasql.c", "src/ls_mysql.c" }, 30 | libraries = { "mysqlclient" }, 31 | incdirs = { "$(MYSQL_INCDIR)" }, 32 | libdirs = { "$(MYSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-mysql-2.3.4-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-MySQL" 2 | version = "2.3.4-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.4", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (MySQL driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | MYSQL = { 22 | header = "mysql.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.mysql"] = { 29 | sources = { "src/luasql.c", "src/ls_mysql.c" }, 30 | libraries = { "mysqlclient" }, 31 | incdirs = { "$(MYSQL_INCDIR)" }, 32 | libdirs = { "$(MYSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-mysql-2.3.5-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-MySQL" 2 | version = "2.3.5-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.5", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (MySQL driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | MYSQL = { 22 | header = "mysql.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.mysql"] = { 29 | sources = { "src/luasql.c", "src/ls_mysql.c" }, 30 | libraries = { "mysqlclient" }, 31 | incdirs = { "$(MYSQL_INCDIR)" }, 32 | libdirs = { "$(MYSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-mysql-2.4.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-MySQL" 2 | version = "2.4.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.4.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (MySQL driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | MYSQL = { 22 | header = "mysql.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.mysql"] = { 29 | sources = { "src/luasql.c", "src/ls_mysql.c" }, 30 | libraries = { "mysqlclient" }, 31 | incdirs = { "$(MYSQL_INCDIR)" }, 32 | libdirs = { "$(MYSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-mysql-2.5.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-MySQL" 2 | version = "2.5.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "2.5.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (MySQL driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | MYSQL = { 22 | header = "mysql.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.mysql"] = { 29 | sources = { "src/luasql.c", "src/ls_mysql.c" }, 30 | libraries = { "mysqlclient" }, 31 | incdirs = { "$(MYSQL_INCDIR)" }, 32 | libdirs = { "$(MYSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-mysql-2.6.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-MySQL" 2 | version = "2.6.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (MySQL driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | MYSQL = { 22 | header = "mysql.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.mysql"] = { 29 | sources = { "src/luasql.c", "src/ls_mysql.c" }, 30 | libraries = { "mysqlclient" }, 31 | incdirs = { "$(MYSQL_INCDIR)" }, 32 | libdirs = { "$(MYSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-mysql-2.6.0-2.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-MySQL" 2 | version = "2.6.0-2" 3 | source = { 4 | url = "git+https://github.com/keplerproject/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (MySQL driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | MYSQL = { 22 | header = "mysql.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.mysql"] = { 29 | sources = { "src/luasql.c", "src/ls_mysql.c" }, 30 | libraries = { "mysqlclient" }, 31 | incdirs = { "$(MYSQL_INCDIR)" }, 32 | libdirs = { "$(MYSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-mysql-2.6.0-3.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-MySQL" 2 | version = "2.6.0-3" 3 | source = { 4 | url = "git+https://github.com/lunarmodules/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (MySQL driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "https://lunarmodules.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | MYSQL = { 22 | header = "mysql.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.mysql"] = { 29 | sources = { "src/luasql.c", "src/ls_mysql.c" }, 30 | libraries = { "mysqlclient" }, 31 | incdirs = { "$(MYSQL_INCDIR)" }, 32 | libdirs = { "$(MYSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-mysql-2.7.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-MySQL" 2 | version = "2.7.0-1" 3 | source = { 4 | url = "git+https://github.com/lunarmodules/luasql.git", 5 | branch = "2.7.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (MySQL driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "https://lunarmodules.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | MYSQL = { 22 | header = "mysql.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.mysql"] = { 29 | sources = { "src/luasql.c", "src/ls_mysql.c" }, 30 | libraries = { "mysqlclient" }, 31 | incdirs = { "$(MYSQL_INCDIR)" }, 32 | libdirs = { "$(MYSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-mysql-cvs-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-MySQL" 2 | version = "cvs-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git" 5 | } 6 | description = { 7 | summary = "Database connectivity for Lua (MySQL driver)", 8 | detailed = [[ 9 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 10 | Lua program to connect to databases, execute arbitrary SQL statements 11 | and retrieve results in a row-by-row cursor fashion. 12 | ]], 13 | license = "MIT/X11", 14 | homepage = "http://www.keplerproject.org/luasql/" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | external_dependencies = { 20 | MYSQL = { 21 | header = "mysql.h" 22 | } 23 | } 24 | build = { 25 | type = "builtin", 26 | modules = { 27 | ["luasql.mysql"] = { 28 | sources = { "src/luasql.c", "src/ls_mysql.c" }, 29 | libraries = { "mysqlclient" }, 30 | incdirs = { "$(MYSQL_INCDIR)" }, 31 | libdirs = { "$(MYSQL_LIBDIR)" } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /rockspec/luasql-oci8-2.3.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-OCI8" 2 | version = "2.3.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Oracle driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | OCI8 = { 22 | header = "oci.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.oci8"] = { 29 | sources = { "src/luasql.c", "src/ls_oci8.c" }, 30 | libraries = { "z", "clntsh", }, 31 | incdirs = { "$(OCI8_INCDIR)" }, 32 | libdirs = { "$(OCI8_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-oci8-2.3.4-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-OCI8" 2 | version = "2.3.4-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.4", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Oracle driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | OCI8 = { 22 | header = "oci.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.oci8"] = { 29 | sources = { "src/luasql.c", "src/ls_oci8.c" }, 30 | libraries = { "z", "clntsh", }, 31 | incdirs = { "$(OCI8_INCDIR)" }, 32 | libdirs = { "$(OCI8_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-oci8-2.4.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-OCI8" 2 | version = "2.4.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.4.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Oracle driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | OCI8 = { 22 | header = "oci.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.oci8"] = { 29 | sources = { "src/luasql.c", "src/ls_oci8.c" }, 30 | libraries = { "z", "clntsh", }, 31 | incdirs = { "$(OCI8_INCDIR)" }, 32 | libdirs = { "$(OCI8_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-oci8-2.5.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-OCI8" 2 | version = "2.5.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "2.5.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Oracle driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | OCI8 = { 22 | header = "oci.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.oci8"] = { 29 | sources = { "src/luasql.c", "src/ls_oci8.c" }, 30 | libraries = { "z", "clntsh", }, 31 | incdirs = { "$(OCI8_INCDIR)" }, 32 | libdirs = { "$(OCI8_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-oci8-2.6.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-OCI8" 2 | version = "2.6.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Oracle driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | OCI8 = { 22 | header = "oci.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.oci8"] = { 29 | sources = { "src/luasql.c", "src/ls_oci8.c" }, 30 | libraries = { "z", "clntsh", }, 31 | incdirs = { "$(OCI8_INCDIR)" }, 32 | libdirs = { "$(OCI8_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-oci8-2.6.0-2.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-OCI8" 2 | version = "2.6.0-2" 3 | source = { 4 | url = "git+https://github.com/keplerproject/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Oracle driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | OCI8 = { 22 | header = "oci.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.oci8"] = { 29 | sources = { "src/luasql.c", "src/ls_oci8.c" }, 30 | libraries = { "z", "clntsh", }, 31 | incdirs = { "$(OCI8_INCDIR)" }, 32 | libdirs = { "$(OCI8_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-oci8-2.6.0-3.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-OCI8" 2 | version = "2.6.0-3" 3 | source = { 4 | url = "git+https://github.com/lunarmodules/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Oracle driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "https://lunarmodules.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | OCI8 = { 22 | header = "oci.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.oci8"] = { 29 | sources = { "src/luasql.c", "src/ls_oci8.c" }, 30 | libraries = { "z", "clntsh", }, 31 | incdirs = { "$(OCI8_INCDIR)" }, 32 | libdirs = { "$(OCI8_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-odbc-2.3.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-ODBC" 2 | version = "2.3.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (ODBC driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | ODBC = { 22 | header = "sql.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.odbc"] = { 29 | sources = { "src/luasql.c", "src/ls_odbc.c" }, 30 | libraries = { "odbc" }, 31 | incdirs = { "$(ODBC_INCDIR)" }, 32 | libdirs = { "$(ODBC_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-odbc-2.3.4-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-ODBC" 2 | version = "2.3.4-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.4", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (ODBC driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | ODBC = { 22 | header = "sql.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.odbc"] = { 29 | sources = { "src/luasql.c", "src/ls_odbc.c" }, 30 | libraries = { "odbc" }, 31 | incdirs = { "$(ODBC_INCDIR)" }, 32 | libdirs = { "$(ODBC_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-odbc-2.4.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-ODBC" 2 | version = "2.4.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.4.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (ODBC driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | ODBC = { 22 | header = "sql.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.odbc"] = { 29 | sources = { "src/luasql.c", "src/ls_odbc.c" }, 30 | libraries = { "odbc" }, 31 | incdirs = { "$(ODBC_INCDIR)" }, 32 | libdirs = { "$(ODBC_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-odbc-2.5.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-ODBC" 2 | version = "2.5.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "2.5.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (ODBC driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | ODBC = { 22 | header = "sql.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.odbc"] = { 29 | sources = { "src/luasql.c", "src/ls_odbc.c" }, 30 | libraries = { "odbc" }, 31 | incdirs = { "$(ODBC_INCDIR)" }, 32 | libdirs = { "$(ODBC_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-odbc-2.6.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-ODBC" 2 | version = "2.6.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (ODBC driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | ODBC = { 22 | header = "sql.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.odbc"] = { 29 | sources = { "src/luasql.c", "src/ls_odbc.c" }, 30 | libraries = { "odbc" }, 31 | incdirs = { "$(ODBC_INCDIR)" }, 32 | libdirs = { "$(ODBC_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-odbc-2.6.0-2.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-ODBC" 2 | version = "2.6.0-2" 3 | source = { 4 | url = "git+https://github.com/keplerproject/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (ODBC driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | ODBC = { 22 | header = "sql.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.odbc"] = { 29 | sources = { "src/luasql.c", "src/ls_odbc.c" }, 30 | libraries = { "odbc" }, 31 | incdirs = { "$(ODBC_INCDIR)" }, 32 | libdirs = { "$(ODBC_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-odbc-2.6.0-3.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-ODBC" 2 | version = "2.6.0-3" 3 | source = { 4 | url = "git+https://github.com/lunarmodules/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (ODBC driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "https://lunarmodules.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | ODBC = { 22 | header = "sql.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | platforms = { 28 | windows = { 29 | modules = { 30 | ["luasql.odbc"] = { 31 | sources = { "src/luasql.c", "src/ls_odbc.c" }, 32 | incdirs = { "$(ODBC_INCDIR)" }, 33 | libdirs = { "$(ODBC_LIBDIR)" }, 34 | libraries = { "odbc32" } 35 | } 36 | } 37 | }, 38 | unix = { 39 | modules = { 40 | ["luasql.odbc"] = { 41 | sources = { "src/luasql.c", "src/ls_odbc.c" }, 42 | incdirs = { "$(ODBC_INCDIR)" }, 43 | libdirs = { "$(ODBC_LIBDIR)" }, 44 | libraries = { "odbc" } 45 | } 46 | } 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /rockspec/luasql-odbc-cvs-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-ODBC" 2 | version = "cvs-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git" 5 | } 6 | description = { 7 | summary = "Database connectivity for Lua (ODBC driver)", 8 | detailed = [[ 9 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 10 | Lua program to connect to databases, execute arbitrary SQL statements 11 | and retrieve results in a row-by-row cursor fashion. 12 | ]], 13 | license = "MIT/X11", 14 | homepage = "http://www.keplerproject.org/luasql/" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | external_dependencies = { 20 | ODBC = { 21 | header = "sql.h" 22 | } 23 | } 24 | build = { 25 | type = "make", 26 | variables = { 27 | T="odbc", 28 | LIB_OPTION = "$(LIBFLAG) -L$(ODBC_LIBDIR) -lodbc", 29 | CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) -I$(ODBC_INCDIR) -DUNIXODBC" 30 | }, 31 | build_variables = { 32 | DRIVER_LIBS = "", 33 | }, 34 | install_variables = { 35 | LUA_LIBDIR = "$(LIBDIR)", 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /rockspec/luasql-postgres-2.3.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Postgres" 2 | version = "2.3.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Postgres driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | PGSQL = { 22 | header = "pg_config.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.postgres"] = { 29 | sources = { "src/luasql.c", "src/ls_postgres.c" }, 30 | libraries = { "pq" }, 31 | incdirs = { "$(PGSQL_INCDIR)" }, 32 | libdirs = { "$(PGSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-postgres-2.3.1-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Postgres" 2 | version = "2.3.1-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.1", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Postgres driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.0" 19 | } 20 | external_dependencies = { 21 | PGSQL = { 22 | header = "pg_config.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.postgres"] = { 29 | sources = { "src/luasql.c", "src/ls_postgres.c" }, 30 | libraries = { "pq" }, 31 | incdirs = { "$(PGSQL_INCDIR)" }, 32 | libdirs = { "$(PGSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-postgres-2.3.2-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Postgres" 2 | version = "2.3.2-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.2", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Postgres driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.0" 19 | } 20 | external_dependencies = { 21 | PGSQL = { 22 | header = "pg_config.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.postgres"] = { 29 | sources = { "src/luasql.c", "src/ls_postgres.c" }, 30 | libraries = { "pq" }, 31 | incdirs = { "$(PGSQL_INCDIR)" }, 32 | libdirs = { "$(PGSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-postgres-2.3.3-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Postgres" 2 | version = "2.3.3-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.3", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Postgres driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.0" 19 | } 20 | external_dependencies = { 21 | PGSQL = { 22 | header = "pg_config.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.postgres"] = { 29 | sources = { "src/luasql.c", "src/ls_postgres.c" }, 30 | libraries = { "pq" }, 31 | incdirs = { "$(PGSQL_INCDIR)" }, 32 | libdirs = { "$(PGSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-postgres-2.3.4-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Postgres" 2 | version = "2.3.4-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.4", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Postgres driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.0" 19 | } 20 | external_dependencies = { 21 | PGSQL = { 22 | header = "pg_config.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.postgres"] = { 29 | sources = { "src/luasql.c", "src/ls_postgres.c" }, 30 | libraries = { "pq" }, 31 | incdirs = { "$(PGSQL_INCDIR)" }, 32 | libdirs = { "$(PGSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-postgres-2.3.5-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Postgres" 2 | version = "2.3.5-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.5", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Postgres driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.0" 19 | } 20 | external_dependencies = { 21 | PGSQL = { 22 | header = "pg_config.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.postgres"] = { 29 | sources = { "src/luasql.c", "src/ls_postgres.c" }, 30 | libraries = { "pq" }, 31 | incdirs = { "$(PGSQL_INCDIR)" }, 32 | libdirs = { "$(PGSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-postgres-2.3.5-2.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Postgres" 2 | version = "2.3.5-2" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.5", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Postgres driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://keplerproject.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.0" 19 | } 20 | external_dependencies = { 21 | PGSQL = { 22 | header = "libpq-fe.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.postgres"] = { 29 | sources = { "src/luasql.c", "src/ls_postgres.c" }, 30 | libraries = { "pq" }, 31 | incdirs = { "$(PGSQL_INCDIR)" }, 32 | libdirs = { "$(PGSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-postgres-2.4.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Postgres" 2 | version = "2.4.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.4.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Postgres driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://keplerproject.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.0" 19 | } 20 | external_dependencies = { 21 | PGSQL = { 22 | header = "libpq-fe.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.postgres"] = { 29 | sources = { "src/luasql.c", "src/ls_postgres.c" }, 30 | libraries = { "pq" }, 31 | incdirs = { "$(PGSQL_INCDIR)" }, 32 | libdirs = { "$(PGSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-postgres-2.5.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Postgres" 2 | version = "2.5.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "2.5.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Postgres driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://keplerproject.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.0" 19 | } 20 | external_dependencies = { 21 | PGSQL = { 22 | header = "libpq-fe.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.postgres"] = { 29 | sources = { "src/luasql.c", "src/ls_postgres.c" }, 30 | libraries = { "pq" }, 31 | incdirs = { "$(PGSQL_INCDIR)" }, 32 | libdirs = { "$(PGSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-postgres-2.6.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Postgres" 2 | version = "2.6.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Postgres driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://keplerproject.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.0" 19 | } 20 | external_dependencies = { 21 | PGSQL = { 22 | header = "libpq-fe.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.postgres"] = { 29 | sources = { "src/luasql.c", "src/ls_postgres.c" }, 30 | libraries = { "pq" }, 31 | incdirs = { "$(PGSQL_INCDIR)" }, 32 | libdirs = { "$(PGSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-postgres-2.6.0-2.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Postgres" 2 | version = "2.6.0-2" 3 | source = { 4 | url = "git+https://github.com/keplerproject/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Postgres driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://keplerproject.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.0" 19 | } 20 | external_dependencies = { 21 | PGSQL = { 22 | header = "libpq-fe.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.postgres"] = { 29 | sources = { "src/luasql.c", "src/ls_postgres.c" }, 30 | libraries = { "pq" }, 31 | incdirs = { "$(PGSQL_INCDIR)" }, 32 | libdirs = { "$(PGSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-postgres-2.6.0-3.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Postgres" 2 | version = "2.6.0-3" 3 | source = { 4 | url = "git+https://github.com/lunarmodules/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Postgres driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "https://lunarmodules.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.0" 19 | } 20 | external_dependencies = { 21 | PGSQL = { 22 | header = "libpq-fe.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.postgres"] = { 29 | sources = { "src/luasql.c", "src/ls_postgres.c" }, 30 | libraries = { "pq" }, 31 | incdirs = { "$(PGSQL_INCDIR)" }, 32 | libdirs = { "$(PGSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-postgres-2.7.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Postgres" 2 | version = "2.7.0-1" 3 | source = { 4 | url = "git+https://github.com/lunarmodules/luasql.git", 5 | branch = "2.7.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (Postgres driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "https://lunarmodules.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | PGSQL = { 22 | header = "libpq-fe.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.postgres"] = { 29 | sources = { "src/luasql.c", "src/ls_postgres.c" }, 30 | libraries = { "pq" }, 31 | incdirs = { "$(PGSQL_INCDIR)" }, 32 | libdirs = { "$(PGSQL_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-postgres-cvs-2.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-Postgres" 2 | version = "cvs-2" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git" 5 | } 6 | description = { 7 | summary = "Database connectivity for Lua (Postgres driver)", 8 | detailed = [[ 9 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 10 | Lua program to connect to databases, execute arbitrary SQL statements 11 | and retrieve results in a row-by-row cursor fashion. 12 | ]], 13 | license = "MIT/X11", 14 | homepage = "http://www.keplerproject.org/luasql/" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | external_dependencies = { 20 | POSTGRES = { 21 | header = "pg_config.h" 22 | } 23 | } 24 | build = { 25 | type = "make", 26 | variables = { 27 | T="postgres", 28 | LIB_OPTION = "$(LIBFLAG) -L$(POSTGRES_LIBDIR) -lpq", 29 | CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) -I$(POSTGRES_INCDIR) -I$(POSTGRES_INCDIR)/postgresql" 30 | }, 31 | build_variables = { 32 | DRIVER_LIBS="", 33 | }, 34 | install_variables = { 35 | LUA_LIBDIR = "$(LIBDIR)", 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite-2.2.0rc1-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite" 2 | version = "2.2.0rc1-1" 3 | source = { 4 | url = "http://luasql.luaforge.net/luasql-2.2.0rc1.tar.gz", 5 | } 6 | description = { 7 | summary = "Database connectivity for Lua (SQLite driver)", 8 | detailed = [[ 9 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 10 | Lua program to connect to databases, execute arbitrary SQL statements 11 | and retrieve results in a row-by-row cursor fashion. 12 | ]], 13 | license = "MIT/X11", 14 | homepage = "http://www.keplerproject.org/luasql/" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | external_dependencies = { 20 | SQLITE = { 21 | header = "sqlite.h" 22 | } 23 | } 24 | build = { 25 | type = "make", 26 | variables = { 27 | T="sqlite", 28 | LIB_OPTION = "$(LIBFLAG) -L$(SQLITE_LIBDIR) -lsqlite", 29 | CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) -I$(SQLITE_INCDIR)" 30 | }, 31 | build_variables = { 32 | DRIVER_LIBS="", 33 | }, 34 | install_variables = { 35 | LUA_LIBDIR = "$(LIBDIR)", 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite-2.3.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite" 2 | version = "2.3.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite.c" }, 30 | libraries = { "sqlite" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite-2.3.4-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite" 2 | version = "2.3.4-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.4", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite.c" }, 30 | libraries = { "sqlite" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite-2.4.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite" 2 | version = "2.4.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.4.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite.c" }, 30 | libraries = { "sqlite" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite-2.5.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite" 2 | version = "2.5.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "2.5.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite.c" }, 30 | libraries = { "sqlite" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite-2.6.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite" 2 | version = "2.6.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite.c" }, 30 | libraries = { "sqlite" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite-2.6.0-2.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite" 2 | version = "2.6.0-2" 3 | source = { 4 | url = "git+https://github.com/keplerproject/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite.c" }, 30 | libraries = { "sqlite" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite-2.6.0-3.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite" 2 | version = "2.6.0-3" 3 | source = { 4 | url = "git+https://github.com/lunarmodules/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "https://lunarmodules.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite.c" }, 30 | libraries = { "sqlite" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite-cvs-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite" 2 | version = "cvs-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git" 5 | } 6 | description = { 7 | summary = "Database connectivity for Lua (SQLite driver)", 8 | detailed = [[ 9 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 10 | Lua program to connect to databases, execute arbitrary SQL statements 11 | and retrieve results in a row-by-row cursor fashion. 12 | ]], 13 | license = "MIT/X11", 14 | homepage = "http://www.keplerproject.org/luasql/" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | external_dependencies = { 20 | SQLITE = { 21 | header = "sqlite.h" 22 | } 23 | } 24 | build = { 25 | type = "builtin", 26 | modules = { 27 | ["luasql.sqlite"] = { 28 | sources = { "src/luasql.c", "src/ls_sqlite.c" }, 29 | libraries = { "sqlite" }, 30 | incdirs = { "$(SQLITE_INCDIR)" }, 31 | libdirs = { "$(SQLITE_LIBDIR)" } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite3-2.2.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite3" 2 | version = "2.2.0-1" 3 | source = { 4 | url = "http://cloud.github.com/downloads/keplerproject/luasql/luasql-2.2.0.tar.gz" 5 | } 6 | description = { 7 | summary = "Database connectivity for Lua (SQLite3 driver)", 8 | detailed = [[ 9 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 10 | Lua program to connect to databases, execute arbitrary SQL statements 11 | and retrieve results in a row-by-row cursor fashion. 12 | ]], 13 | license = "MIT/X11", 14 | homepage = "http://www.keplerproject.org/luasql/" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | external_dependencies = { 20 | SQLITE = { 21 | header = "sqlite3.h" 22 | } 23 | } 24 | build = { 25 | type = "builtin", 26 | modules = { 27 | ["luasql.sqlite3"] = { 28 | sources = { "src/luasql.c", "src/ls_sqlite3.c" }, 29 | libraries = { "sqlite3" }, 30 | incdirs = { "$(SQLITE_INCDIR)" }, 31 | libdirs = { "$(SQLITE_LIBDIR)" } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite3-2.2.0rc1-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite3" 2 | version = "2.2.0rc1-1" 3 | source = { 4 | url = "http://luasql.luaforge.net/luasql-2.2.0rc1.tar.gz", 5 | } 6 | description = { 7 | summary = "Database connectivity for Lua (SQLite3 driver)", 8 | detailed = [[ 9 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 10 | Lua program to connect to databases, execute arbitrary SQL statements 11 | and retrieve results in a row-by-row cursor fashion. 12 | ]], 13 | license = "MIT/X11", 14 | homepage = "http://www.keplerproject.org/luasql/" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | external_dependencies = { 20 | SQLITE = { 21 | header = "sqlite3.h" 22 | } 23 | } 24 | build = { 25 | type = "make", 26 | variables = { 27 | T="sqlite3", 28 | LIB_OPTION = "$(LIBFLAG) -L$(SQLITE_LIBDIR) -lsqlite3", 29 | CFLAGS = "$(CFLAGS) -I$(LUA_INCDIR) -I$(SQLITE_INCDIR)" 30 | }, 31 | build_variables = { 32 | DRIVER_LIBS="", 33 | }, 34 | install_variables = { 35 | LUA_LIBDIR = "$(LIBDIR)", 36 | }, 37 | platforms = { 38 | win32 = { 39 | variables = { 40 | LIB_OPTION = "$(SQLITE_LIB) $(LUA_LIBDIR)\\lua5.1.lib", 41 | CFLAGS = "$(CFLAGS) /I$(LUA_INCDIR) /I$(SQLITE_INCDIR)" 42 | } 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite3-2.3.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite3" 2 | version = "2.3.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite3 driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite3.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite3"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite3.c" }, 30 | libraries = { "sqlite3" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite3-2.3.4-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite3" 2 | version = "2.3.4-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.4", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite3 driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite3.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite3"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite3.c" }, 30 | libraries = { "sqlite3" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite3-2.3.5-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite3" 2 | version = "2.3.5-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.3.5", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite3 driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite3.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite3"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite3.c" }, 30 | libraries = { "sqlite3" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite3-2.4.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite3" 2 | version = "2.4.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "v2.4.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite3 driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite3.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite3"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite3.c" }, 30 | libraries = { "sqlite3" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite3-2.5.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite3" 2 | version = "2.5.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "2.5.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite3 driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite3.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite3"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite3.c" }, 30 | libraries = { "sqlite3" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite3-2.6.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite3" 2 | version = "2.6.0-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite3 driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite3.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite3"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite3.c" }, 30 | libraries = { "sqlite3" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite3-2.6.0-2.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite3" 2 | version = "2.6.0-2" 3 | source = { 4 | url = "git+https://github.com/keplerproject/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite3 driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "http://www.keplerproject.org/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite3.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite3"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite3.c" }, 30 | libraries = { "sqlite3" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite3-2.6.0-3.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite3" 2 | version = "2.6.0-3" 3 | source = { 4 | url = "git+https://github.com/lunarmodules/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite3 driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "https://lunarmodules.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite3.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite3"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite3.c" }, 30 | libraries = { "sqlite3" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite3-2.6.1-3.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite3" 2 | version = "2.6.1-3" 3 | source = { 4 | url = "git+https://github.com/lunarmodules/luasql.git", 5 | branch = "2.6.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite3 driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "https://lunarmodules.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite3.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite3"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite3.c" }, 30 | libraries = { "sqlite3" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite3-2.7.0-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite3" 2 | version = "2.7.0-1" 3 | source = { 4 | url = "git+https://github.com/lunarmodules/luasql.git", 5 | branch = "2.7.0", 6 | } 7 | description = { 8 | summary = "Database connectivity for Lua (SQLite3 driver)", 9 | detailed = [[ 10 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 11 | Lua program to connect to databases, execute arbitrary SQL statements 12 | and retrieve results in a row-by-row cursor fashion. 13 | ]], 14 | license = "MIT/X11", 15 | homepage = "https://lunarmodules.github.io/luasql/" 16 | } 17 | dependencies = { 18 | "lua >= 5.1" 19 | } 20 | external_dependencies = { 21 | SQLITE = { 22 | header = "sqlite3.h" 23 | } 24 | } 25 | build = { 26 | type = "builtin", 27 | modules = { 28 | ["luasql.sqlite3"] = { 29 | sources = { "src/luasql.c", "src/ls_sqlite3.c" }, 30 | libraries = { "sqlite3" }, 31 | incdirs = { "$(SQLITE_INCDIR)" }, 32 | libdirs = { "$(SQLITE_LIBDIR)" } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /rockspec/luasql-sqlite3-cvs-1.rockspec: -------------------------------------------------------------------------------- 1 | package = "LuaSQL-SQLite3" 2 | version = "cvs-1" 3 | source = { 4 | url = "git://github.com/keplerproject/luasql.git" 5 | } 6 | description = { 7 | summary = "Database connectivity for Lua (SQLite3 driver)", 8 | detailed = [[ 9 | LuaSQL is a simple interface from Lua to a DBMS. It enables a 10 | Lua program to connect to databases, execute arbitrary SQL statements 11 | and retrieve results in a row-by-row cursor fashion. 12 | ]], 13 | license = "MIT/X11", 14 | homepage = "http://www.keplerproject.org/luasql/" 15 | } 16 | dependencies = { 17 | "lua >= 5.1" 18 | } 19 | external_dependencies = { 20 | SQLITE = { 21 | header = "sqlite3.h" 22 | } 23 | } 24 | build = { 25 | type = "builtin", 26 | modules = { 27 | ["luasql.sqlite3"] = { 28 | sources = { "src/luasql.c", "src/ls_sqlite3.c" }, 29 | libraries = { "sqlite3" }, 30 | incdirs = { "$(SQLITE_INCDIR)" }, 31 | libdirs = { "$(SQLITE_LIBDIR)" } 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/firebird.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | luaopen_luasql_firebird 3 | -------------------------------------------------------------------------------- /src/jdbc/Makefile: -------------------------------------------------------------------------------- 1 | # JDBC 2 | JDK= $(JAVA_HOME) 3 | #source dir 4 | JDBC_SRC= src/java 5 | #lib dir 6 | JDBC_LIB= lib 7 | #build dir 8 | JDBC_BUILD= bin 9 | #java compiler 10 | JAVAC= $(JAVA_HOME)/bin/javac 11 | JAR= $(JAVA_HOME)/bin/jar 12 | #luajava jar name 13 | LUAJAVA_JAR= luajava-1.0b4.jar 14 | #compilation options 15 | COMPILEOPT= -d $(JDBC_BUILD) -classpath $(JDBC_LIB)/$(LUAJAVA_JAR) 16 | #package name 17 | ALLPACKAGES= org/keplerproject/luasql/jdbc 18 | SUBDIRS= addprefix $(JDBC_SRC), $(ALLPACKAGES) 19 | SOURCEDIRS= $(JDBC_SRC)/$(ALLPACKAGES) 20 | SOURCEFILES = $(addsuffix /*.java, $(SOURCEDIRS)) 21 | JARSDIR= . 22 | PACKAGENAME= luasql 23 | 24 | 25 | jdbc_driver: 26 | rm -rf $(JDBC_BUILD) 27 | mkdir $(JDBC_BUILD) 28 | for i in $(SUBDIRS); \ 29 | do ( $(JAVAC) $(COMPILEOPT) $(SOURCEFILES) ) done 30 | $(JAR) -cvf $(JARSDIR)/$(PACKAGENAME).jar -C $(JDBC_BUILD) . 31 | 32 | clean: 33 | rm -rf $(JDBC_BUILD) 34 | rm -f $(JARSDIR)/$(PACKAGENAME).jar 35 | 36 | -------------------------------------------------------------------------------- /src/jdbc/Makefile.win: -------------------------------------------------------------------------------- 1 | # JDBC 2 | JDK= $(JAVA_HOME) 3 | #source dir 4 | JDBC_SRC= src\java 5 | #lib dir 6 | JDBC_LIB= lib 7 | #build dir 8 | JDBC_BUILD= bin 9 | #java compiler 10 | JAVAC= $(JAVA_HOME)\bin\javac.exe 11 | JAR= $(JAVA_HOME)\bin\jar.exe 12 | #luajava jar name 13 | LUAJAVA_JAR= luajava-1.0b4.jar 14 | #compilation options 15 | COMPILEOPT= -d $(JDBC_BUILD) -classpath $(JDBC_LIB)\$(LUAJAVA_JAR) 16 | #package name 17 | ALLPACKAGES= org/keplerproject/luasql/jdbc 18 | SUBDIRS= addprefix $(JDBC_SRC), $(ALLPACKAGES) 19 | SOURCEDIRS= $(JDBC_SRC)/$(ALLPACKAGES) 20 | SOURCEFILES = $(addsuffix /*.java, $(SOURCEDIRS)) 21 | JARSDIR= . 22 | PACKAGENAME= luasql 23 | 24 | 25 | jdbc_driver: 26 | rm -rf $(JDBC_BUILD) 27 | mkdir $(JDBC_BUILD) 28 | for i in $(SUBDIRS); \ 29 | do ( $(JAVAC) $(COMPILEOPT) $(SOURCEFILES) ) done 30 | $(JAR) -cvf $(JARSDIR)/$(PACKAGENAME).jar -C $(JDBC_BUILD) . 31 | 32 | clean: 33 | rm -rf $(JDBC_BUILD) 34 | rm -f $(JARSDIR)/$(PACKAGENAME).jar 35 | 36 | -------------------------------------------------------------------------------- /src/jdbc/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | -------------------------------------------------------------------------------- /src/jdbc/src/java/org/keplerproject/luasql/jdbc/LuaSQLCursor.java: -------------------------------------------------------------------------------- 1 | package org.keplerproject.luasql.jdbc; 2 | 3 | import java.sql.ResultSet; 4 | import java.sql.ResultSetMetaData; 5 | import java.sql.SQLException; 6 | import java.sql.Types; 7 | 8 | import org.keplerproject.luajava.JavaFunction; 9 | import org.keplerproject.luajava.LuaException; 10 | import org.keplerproject.luajava.LuaObject; 11 | import org.keplerproject.luajava.LuaState; 12 | 13 | /** 14 | * LuaSQL JDBC cursor. Is implemented in Java because it's more efficient. 15 | * The fetch method was slow in Lua, due to many accesses to Java. 16 | * 17 | * @author Thiago Ponte 18 | */ 19 | public class LuaSQLCursor 20 | { 21 | private LuaState L; 22 | private ResultSet rs; 23 | 24 | /** 25 | * Function that open the Lib. 26 | */ 27 | static public int open(LuaState L) throws LuaException 28 | { 29 | L.pushJavaFunction(new JavaFunction(L){ 30 | 31 | /** 32 | * Creates a LuaSQLCursor and returns it. 33 | */ 34 | public int execute() throws LuaException 35 | { 36 | ResultSet rs = (ResultSet) L.getObjectFromUserdata(2); 37 | 38 | L.pushJavaObject(new LuaSQLCursor(L, rs)); 39 | 40 | return 1; 41 | } 42 | }); 43 | 44 | return 1; 45 | } 46 | 47 | protected LuaSQLCursor(LuaState L, ResultSet rs) 48 | { 49 | this.L = L; 50 | this.rs = rs; 51 | } 52 | 53 | /** 54 | * 55 | * @param table the results will be copied into the table and this table will be returned. 56 | * @param modeString the results will be copied into the table and this table will be returned
57 | * "n" the resulting table will have numerical indices (default)
58 | * "a" the resulting table will have alphanumerical indices 59 | * @return the parameter table 60 | */ 61 | public LuaObject fetch(LuaObject table, String modeString) 62 | { 63 | try 64 | { 65 | if (!rs.next()) 66 | return null; 67 | 68 | table.push(); 69 | 70 | ResultSetMetaData md = rs.getMetaData(); 71 | int columnCount = md.getColumnCount(); 72 | for (int i = 1; i <= columnCount; i++) 73 | { 74 | int type = md.getColumnType(i); 75 | 76 | /* if ("a".equalsIgnoreCase(modeString)) 77 | L.pushString(md.getColumnName(i)); 78 | else 79 | L.pushNumber(i);*/ 80 | 81 | switch (type) 82 | { 83 | case Types.INTEGER: case Types.BIGINT: case Types.SMALLINT: 84 | case Types.DECIMAL: case Types.DOUBLE: case Types.FLOAT: 85 | case Types.NUMERIC: case Types.REAL: case Types.TINYINT: 86 | 87 | L.pushNumber(rs.getDouble(i)); 88 | break; 89 | 90 | case Types.CHAR: case Types.VARCHAR: 91 | case Types.LONGVARCHAR: case Types.CLOB: 92 | 93 | L.pushString(rs.getString(i)); 94 | break; 95 | 96 | case Types.BINARY: case Types.VARBINARY: 97 | case Types.LONGVARBINARY: case Types.BLOB: 98 | 99 | L.pushString(rs.getBytes(i)); 100 | break; 101 | 102 | case Types.BIT: case Types.BOOLEAN: 103 | 104 | L.pushBoolean(rs.getBoolean(i)? 1 : 0); 105 | break; 106 | 107 | case Types.DATE: case Types.TIME: case Types.TIMESTAMP: 108 | 109 | L.pushString(rs.getDate(i).toString()); 110 | break; 111 | 112 | case Types.NULL: 113 | 114 | L.pushNil(); 115 | break; 116 | 117 | default: 118 | 119 | L.pushString(rs.getString(i)); 120 | break; 121 | } 122 | 123 | if (modeString.contains("a")) 124 | { 125 | L.pushString(md.getColumnName(i)); 126 | L.pushValue(-2); 127 | L.setTable(-4); 128 | } 129 | if (modeString.contains("n")) 130 | { 131 | L.pushNumber(i); 132 | L.pushValue(-2); 133 | L.setTable(-4); 134 | } 135 | 136 | L.pop(1); 137 | } 138 | 139 | L.pop(1); 140 | 141 | return table; 142 | } 143 | catch (SQLException e) 144 | { 145 | return table; 146 | } 147 | } 148 | /** 149 | * Gets the name of the columns. 150 | * 151 | * @return a list of column names. 152 | */ 153 | public LuaObject getcolnames() throws SQLException 154 | { 155 | L.newTable(); 156 | LuaObject table = L.getLuaObject(-1); 157 | 158 | ResultSetMetaData md = rs.getMetaData(); 159 | 160 | for (int i = 1; i <= md.getColumnCount(); i++) 161 | { 162 | String name = md.getColumnName(i); 163 | 164 | L.pushNumber(i); 165 | L.pushString(name); 166 | L.setTable(-3); 167 | } 168 | L.pop(1); 169 | 170 | return table; 171 | } 172 | 173 | /** 174 | * Gets the types of the columns 175 | * 176 | * @return a list of column types. 177 | */ 178 | public LuaObject getcoltypes() throws SQLException 179 | { 180 | L.newTable(); 181 | LuaObject table = L.getLuaObject(-1); 182 | 183 | ResultSetMetaData md = rs.getMetaData(); 184 | 185 | for (int i = 1; i <= md.getColumnCount(); i++) 186 | { 187 | String name = md.getColumnTypeName(i); 188 | 189 | L.pushNumber(i); 190 | L.pushString(name); 191 | L.setTable(-3); 192 | } 193 | L.pop(1); 194 | 195 | return table; 196 | } 197 | } 198 | -------------------------------------------------------------------------------- /src/luasql.c: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: luasql.c,v 1.28 2009/02/11 12:08:50 tomas Exp $ 3 | ** See Copyright Notice in license.html 4 | */ 5 | 6 | #include 7 | 8 | #include "lua.h" 9 | #include "lauxlib.h" 10 | 11 | 12 | #include "luasql.h" 13 | 14 | #if !defined(lua_pushliteral) 15 | #define lua_pushliteral(L, s) \ 16 | lua_pushstring(L, "" s, (sizeof(s)/sizeof(char))-1) 17 | #endif 18 | 19 | 20 | /* 21 | ** Typical database error situation 22 | */ 23 | LUASQL_API int luasql_faildirect(lua_State *L, const char *err) { 24 | lua_pushnil(L); 25 | lua_pushliteral(L, LUASQL_PREFIX); 26 | lua_pushstring(L, err); 27 | lua_concat(L, 2); 28 | return 2; 29 | } 30 | 31 | 32 | /* 33 | ** Database error with LuaSQL message 34 | ** @param err LuaSQL error message. 35 | ** @param m Driver error message. 36 | */ 37 | LUASQL_API int luasql_failmsg(lua_State *L, const char *err, const char *m) { 38 | lua_pushnil(L); 39 | lua_pushliteral(L, LUASQL_PREFIX); 40 | lua_pushstring(L, err); 41 | lua_pushstring(L, m); 42 | lua_concat(L, 3); 43 | return 2; 44 | } 45 | 46 | 47 | typedef struct { short closed; } pseudo_data; 48 | 49 | /* 50 | ** Return the name of the object's metatable. 51 | ** This function is used by `tostring'. 52 | */ 53 | static int luasql_tostring (lua_State *L) { 54 | char buff[100]; 55 | pseudo_data *obj = (pseudo_data *)lua_touserdata (L, 1); 56 | if (obj->closed) 57 | strcpy (buff, "closed"); 58 | else 59 | sprintf (buff, "%p", (void *)obj); 60 | lua_pushfstring (L, "%s (%s)", lua_tostring(L,lua_upvalueindex(1)), buff); 61 | return 1; 62 | } 63 | 64 | 65 | #if !defined LUA_VERSION_NUM || LUA_VERSION_NUM==501 66 | /* 67 | ** Adapted from Lua 5.2.0 68 | */ 69 | void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup) { 70 | luaL_checkstack(L, nup+1, "too many upvalues"); 71 | for (; l->name != NULL; l++) { /* fill the table with given functions */ 72 | int i; 73 | lua_pushstring(L, l->name); 74 | for (i = 0; i < nup; i++) /* copy upvalues to the top */ 75 | lua_pushvalue(L, -(nup + 1)); 76 | lua_pushcclosure(L, l->func, nup); /* closure with those upvalues */ 77 | lua_settable(L, -(nup + 3)); 78 | } 79 | lua_pop(L, nup); /* remove upvalues */ 80 | } 81 | #endif 82 | 83 | /* 84 | ** Create a metatable and leave it on top of the stack. 85 | */ 86 | LUASQL_API int luasql_createmeta (lua_State *L, const char *name, const luaL_Reg *methods) { 87 | if (!luaL_newmetatable (L, name)) 88 | return 0; 89 | 90 | /* define methods */ 91 | luaL_setfuncs (L, methods, 0); 92 | 93 | /* define metamethods */ 94 | lua_pushliteral (L, "__index"); 95 | lua_pushvalue (L, -2); 96 | lua_settable (L, -3); 97 | 98 | lua_pushliteral (L, "__tostring"); 99 | lua_pushstring (L, name); 100 | lua_pushcclosure (L, luasql_tostring, 1); 101 | lua_settable (L, -3); 102 | 103 | lua_pushliteral (L, "__metatable"); 104 | lua_pushliteral (L, LUASQL_PREFIX"you're not allowed to get this metatable"); 105 | lua_settable (L, -3); 106 | 107 | return 1; 108 | } 109 | 110 | 111 | /* 112 | ** Define the metatable for the object on top of the stack 113 | */ 114 | LUASQL_API void luasql_setmeta (lua_State *L, const char *name) { 115 | luaL_getmetatable (L, name); 116 | lua_setmetatable (L, -2); 117 | } 118 | 119 | 120 | /* 121 | ** Assumes the table is on top of the stack. 122 | */ 123 | LUASQL_API void luasql_set_info (lua_State *L) { 124 | lua_pushliteral (L, "_COPYRIGHT"); 125 | lua_pushliteral (L, "Copyright (C) 2003-2025 Kepler Project"); 126 | lua_settable (L, -3); 127 | lua_pushliteral (L, "_DESCRIPTION"); 128 | lua_pushliteral (L, "LuaSQL is a simple interface from Lua to a DBMS"); 129 | lua_settable (L, -3); 130 | lua_pushliteral (L, "_VERSION"); 131 | lua_pushliteral (L, "LuaSQL 2.7.0 (for "LUA_VERSION")"); 132 | lua_settable (L, -3); 133 | } 134 | -------------------------------------------------------------------------------- /src/luasql.h: -------------------------------------------------------------------------------- 1 | /* 2 | ** $Id: luasql.h,v 1.12 2009/02/07 23:16:23 tomas Exp $ 3 | ** See Copyright Notice in license.html 4 | */ 5 | 6 | #ifndef _LUASQL_ 7 | #define _LUASQL_ 8 | 9 | #ifndef LUASQL_API 10 | #define LUASQL_API 11 | #endif 12 | 13 | #if !defined LUA_VERSION_NUM 14 | /* Lua 5.0 */ 15 | #define luaL_Reg luaL_reg 16 | 17 | #define lua_pushinteger(L, n) \ 18 | lua_pushnumber(L, (lua_Number)n) 19 | #endif 20 | 21 | #define LUASQL_PREFIX "LuaSQL: " 22 | #define LUASQL_TABLENAME "luasql" 23 | #define LUASQL_ENVIRONMENT "Each driver must have an environment metatable" 24 | #define LUASQL_CONNECTION "Each driver must have a connection metatable" 25 | #define LUASQL_CURSOR "Each driver must have a cursor metatable" 26 | 27 | // Macro to handle userdata creation across Lua versions 28 | #if LUA_VERSION_NUM >= 504 29 | #define LUASQL_NEWUD(L, size) lua_newuserdatauv(L, size, 0) 30 | #else 31 | #define LUASQL_NEWUD(L, size) lua_newuserdata(L, size) 32 | #endif 33 | 34 | LUASQL_API int luasql_faildirect (lua_State *L, const char *err); 35 | LUASQL_API int luasql_failmsg (lua_State *L, const char *err, const char *m); 36 | LUASQL_API int luasql_createmeta (lua_State *L, const char *name, const luaL_Reg *methods); 37 | LUASQL_API void luasql_setmeta (lua_State *L, const char *name); 38 | LUASQL_API void luasql_set_info (lua_State *L); 39 | 40 | #if !defined LUA_VERSION_NUM || LUA_VERSION_NUM==501 41 | void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup); 42 | #endif 43 | 44 | /* Driver initialization functions prototypes */ 45 | LUASQL_API int luaopen_luasql_firebird (lua_State *L); 46 | LUASQL_API int luaopen_luasql_mysql (lua_State *L); 47 | LUASQL_API int luaopen_luasql_oci8 (lua_State *L); 48 | LUASQL_API int luaopen_luasql_odbc (lua_State *L); 49 | LUASQL_API int luaopen_luasql_postgres (lua_State *L); 50 | LUASQL_API int luaopen_luasql_sqlite (lua_State *L); 51 | LUASQL_API int luaopen_luasql_sqlite3 (lua_State *L); 52 | 53 | #endif 54 | -------------------------------------------------------------------------------- /src/mysql.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | luaopen_luasql_mysql 3 | -------------------------------------------------------------------------------- /src/oci8.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | luaopen_luasql_oci8 3 | -------------------------------------------------------------------------------- /src/odbc.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | luaopen_luasql_odbc 3 | -------------------------------------------------------------------------------- /src/postgres.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | luaopen_luasql_postgres 3 | -------------------------------------------------------------------------------- /src/sqlite.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | luaopen_luasql_sqlite 3 | -------------------------------------------------------------------------------- /src/sqlite3.def: -------------------------------------------------------------------------------- 1 | EXPORTS 2 | luaopen_luasql_sqlite3 3 | -------------------------------------------------------------------------------- /tests/ado.lua: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/lua50 2 | 3 | QUERYING_STRING_TYPE_NAME = "adLongVarWChar" 4 | -------------------------------------------------------------------------------- /tests/example.lua: -------------------------------------------------------------------------------- 1 | -- See Copyright Notice in license.html 2 | 3 | -- load driver 4 | require"luasql.postgres" 5 | -- create environment object 6 | env = assert (luasql.postgres()) 7 | -- connect to data source 8 | con = assert (env:connect("luasql-test")) 9 | -- reset our table 10 | res = con:execute"DROP TABLE people" 11 | res = assert (con:execute[[ 12 | CREATE TABLE people( 13 | name varchar(50), 14 | email varchar(50) 15 | ) 16 | ]]) 17 | -- add a few elements 18 | list = { 19 | { name="Jose das Couves", email="jose@couves.com", }, 20 | { name="Manoel Joaquim", email="manoel.joaquim@cafundo.com", }, 21 | { name="Maria das Dores", email="maria@dores.com", }, 22 | } 23 | for i, p in pairs (list) do 24 | res = assert (con:execute(string.format([[ 25 | INSERT INTO people 26 | VALUES ('%s', '%s')]], p.name, p.email) 27 | )) 28 | end 29 | -- retrieve a cursor 30 | cur = assert (con:execute"SELECT name, email from people") 31 | -- print all rows 32 | row = cur:fetch ({}, "a") -- the rows will be indexed by field names 33 | while row do 34 | print(string.format("Name: %s, E-mail: %s", row.name, row.email)) 35 | row = cur:fetch (row, "a") -- reusing the table of results 36 | end 37 | -- close everything 38 | cur:close() 39 | con:close() 40 | env:close() 41 | -------------------------------------------------------------------------------- /tests/firebird.lua: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------- 2 | -- Firebird specific tests and configurations. 3 | --------------------------------------------------------------------- 4 | 5 | DEFINITION_STRING_TYPE_NAME = "VARCHAR(80)" 6 | QUERYING_STRING_TYPE_NAME = "string" 7 | 8 | CHECK_GETCOL_INFO_TABLES = false 9 | 10 | local orig_create_table = create_table 11 | local orig_drop_table = drop_table 12 | 13 | --------------------------------------------------------------------- 14 | -- New metadata needs to be committed before it is used 15 | --------------------------------------------------------------------- 16 | function create_table () 17 | orig_create_table() 18 | CONN:commit() 19 | end 20 | 21 | function drop_table () 22 | -- Firebird prefers to keep DDL stuff (CREATE TABLE, etc.) 23 | -- separate. So we need a new transaction i.e. connection 24 | -- to work in 25 | assert(CONN:close ()) 26 | CONN = assert(ENV:connect (datasource, username, password)) 27 | orig_drop_table() 28 | CONN:commit() 29 | end 30 | 31 | table.insert (CONN_METHODS, "escape") 32 | table.insert (EXTENSIONS, escape) 33 | 34 | -- Check RETURNING support 35 | table.insert (EXTENSIONS, function() 36 | local cur = assert (CONN:execute[[ 37 | EXECUTE BLOCK 38 | RETURNS (A INTEGER, B INTEGER) 39 | AS 40 | BEGIN 41 | A = 123; 42 | B = 321; 43 | SUSPEND; 44 | END 45 | ]]) 46 | 47 | local f1, f2 = cur:fetch () 48 | assert2 (123, f1) 49 | assert2 (321, f2) 50 | cur:close () 51 | 52 | io.write (" returning") 53 | end) 54 | 55 | -------------------------------------------------------------------------------- /tests/mysql.lua: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------- 2 | -- MySQL specific tests and configurations. 3 | --------------------------------------------------------------------- 4 | 5 | QUERYING_STRING_TYPE_NAME = "binary(262140)" 6 | 7 | --------------------------------------------------------------------- 8 | -- Seeks to an arbitrary row in a query result set. 9 | --------------------------------------------------------------------- 10 | function seek () 11 | -- Inserts three rows. 12 | assert2 (3, CONN:execute"insert into t (f1) values ('a'), ('b'), ('c')", "could not insert a new record") 13 | cur = CUR_OK(CONN:execute"select * from t") 14 | assert2('a', cur:fetch()) 15 | assert2('b', cur:fetch()) 16 | cur:seek(1) 17 | assert2('b', cur:fetch()) 18 | assert2('c', cur:fetch()) 19 | cur:seek(1) 20 | assert2('b', cur:fetch()) 21 | assert2('c', cur:fetch()) 22 | assert2(nil, cur:fetch()) 23 | cur:close() 24 | -- Delete inserted rows 25 | assert2 (3, CONN:execute"delete from t", "Couldn't delete inserted rows!") 26 | 27 | io.write (" seek") 28 | end 29 | 30 | table.insert (CUR_METHODS, "numrows") 31 | table.insert (EXTENSIONS, numrows) 32 | table.insert (CUR_METHODS, "seek") 33 | table.insert (EXTENSIONS, seek) 34 | table.insert (CONN_METHODS, "escape") 35 | table.insert (EXTENSIONS, escape) 36 | 37 | --------------------------------------------------------------------- 38 | -- Build SQL command to create the test table. 39 | --------------------------------------------------------------------- 40 | local _define_table = define_table 41 | function define_table (n) 42 | return _define_table(n) .. " ENGINE = InnoDB;" 43 | end 44 | 45 | --------------------------------------------------------------------- 46 | -- MySQL versions 4.0.x do not implement rollback. 47 | --------------------------------------------------------------------- 48 | local _rollback = rollback 49 | function rollback () 50 | if luasql._MYSQLVERSION and string.sub(luasql._MYSQLVERSION, 1, 3) == "4.0" then 51 | io.write("skipping rollback test (mysql version 4.0.x)") 52 | return 53 | else 54 | _rollback () 55 | end 56 | end 57 | -------------------------------------------------------------------------------- /tests/oci8.lua: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------- 2 | -- Oracle specific tests and configurations. 3 | --------------------------------------------------------------------- 4 | 5 | table.insert (CUR_METHODS, "numrows") 6 | table.insert (EXTENSIONS, numrows) 7 | 8 | DEFINITION_STRING_TYPE_NAME = "varchar(60)" 9 | QUERYING_STRING_TYPE_NAME = "string" 10 | -------------------------------------------------------------------------------- /tests/odbc.lua: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------- 2 | -- ODBC specific tests and configurations. 3 | --------------------------------------------------------------------- 4 | 5 | QUERYING_STRING_TYPE_NAME = "string" 6 | -- The CREATE_TABLE_RETURN_VALUE and DROP_TABLE_RETURN_VALUE works 7 | -- with -1 on MS Access Driver, and 0 on SQL Server Driver 8 | CREATE_TABLE_RETURN_VALUE = -1 9 | DROP_TABLE_RETURN_VALUE = -1 10 | 11 | --------------------------------------------------------------------- 12 | -- Test of data types managed by ODBC driver. 13 | --------------------------------------------------------------------- 14 | table.insert (EXTENSIONS, function () 15 | assert2 (CREATE_TABLE_RETURN_VALUE, CONN:execute"create table test_dt (f1 integer, f2 varchar(30), f3 bit )") 16 | -- Inserts a number, a string value and a "bit" value. 17 | assert2 (1, CONN:execute("insert into test_dt values (?, ?, ?)", 10, "ABCDE", true)) 18 | 19 | -- Checks the results with the inserted values. 20 | local stmt = assert(CONN:prepare"select * from test_dt where f1 = ?") 21 | local cur = CUR_OK (stmt:execute(10)) 22 | local row, err = cur:fetch ({}, "a") 23 | assert2 ("table", type(row), err) 24 | 25 | assert2 (10, row.f1, "Wrong number representation") 26 | assert2 ("ABCDE", row.f2, "Wrong string representation") 27 | assert2 (true, row.f3, "Wrong bit representation") 28 | 29 | cur:close() 30 | stmt:close() 31 | 32 | -- Drops the table 33 | assert2 (DROP_TABLE_RETURN_VALUE, CONN:execute("drop table test_dt") ) 34 | end) 35 | -------------------------------------------------------------------------------- /tests/performance.lua: -------------------------------------------------------------------------------- 1 | #!/usr/local/bin/lua 2 | -- See Copyright Notice in license.html 3 | 4 | TOTAL_ROWS = 200 5 | 6 | --------------------------------------------------------------------- 7 | -- checks for a value and throw an error if it is invalid. 8 | --------------------------------------------------------------------- 9 | function assert2 (expected, value, msg) 10 | if not msg then 11 | msg = '' 12 | else 13 | msg = msg..'\n' 14 | end 15 | return assert (value == expected, 16 | msg.."wrong value (["..tostring(value).."] instead of ".. 17 | tostring(expected)..")") 18 | end 19 | 20 | --------------------------------------------------------------------- 21 | -- object test. 22 | --------------------------------------------------------------------- 23 | function test_object (obj, objmethods) 24 | -- checking object type. 25 | assert2 ("userdata", type(obj), "incorrect object type") 26 | -- trying to get metatable. 27 | assert2 ("LuaSQL: you're not allowed to get this metatable", 28 | getmetatable(obj), "error permitting access to object's metatable") 29 | -- trying to set metatable. 30 | assert2 (false, pcall (setmetatable, ENV, {})) 31 | -- checking existence of object's methods. 32 | for i = 1, table.getn (objmethods) do 33 | local method = objmethods[i] 34 | assert2 ("function", type(obj[method])) 35 | end 36 | return obj 37 | end 38 | 39 | ENV_OK = function (obj) 40 | return test_object (obj, { "close", "connect", }) 41 | end 42 | CONN_OK = function (obj) 43 | return test_object (obj, { "close", "commit", "execute", "rollback", "setautocommit", }) 44 | end 45 | CUR_OK = function (obj) 46 | return test_object (obj, { "close", "fetch", "getcolnames", "getcoltypes", }) 47 | end 48 | 49 | --------------------------------------------------------------------- 50 | -- Main 51 | --------------------------------------------------------------------- 52 | 53 | if type(arg[1]) ~= "string" then 54 | print (string.format ("Usage %s [ [, [, ]]]", arg[0])) 55 | os.exit() 56 | end 57 | 58 | local driver = arg[1] 59 | local datasource = arg[2] or "luasql-test" 60 | local username = arg[3] or nil 61 | local password = arg[4] or nil 62 | 63 | require (arg[1]) 64 | assert (luasql, "no luasql table") 65 | 66 | local env, err = luasql[driver] () 67 | assert (env, err) 68 | conn, err = env:connect (datasource, username, password) 69 | assert (conn, err) 70 | conn:execute ("drop table fetch_test") 71 | -- Create test table 72 | local n, err = conn:execute ([[ 73 | create table fetch_test ( 74 | f1 varchar(30), 75 | f2 varchar(30), 76 | f3 varchar(30), 77 | f4 varchar(30), 78 | f5 varchar(30), 79 | f6 varchar(30), 80 | f7 varchar(30), 81 | f8 varchar(30) 82 | )]]) 83 | assert (n, err) 84 | assert (type(n) == "number", "couldn't create fetch_test table") 85 | -- Insert rows 86 | for i = 1, TOTAL_ROWS do 87 | local n, err = conn:execute ( 88 | "insert into fetch_test values ('f1','f2','f3','f4','f5','f6','f7','f8')") 89 | assert (n, err) 90 | assert (type (n) == "number", "couldn't insert rows") 91 | end 92 | print ("table created; rows inserted") 93 | 94 | -- default 95 | local cur, err = conn:execute ("select * from fetch_test") 96 | assert (cur, err) 97 | --assert (cur:numrows() == TOTAL_ROWS, "wrong number of rows") 98 | local t1 = os.clock() 99 | --for i = 1, cur:numrows() do 100 | --local f1,f2,f3,f4,f5,f6,f7,f8 = cur:fetch() 101 | --end 102 | local f1,f2,f3,f4,f5,f6,f7,f8 = cur:fetch() 103 | while f1 do 104 | f1,f2,f3,f4,f5,f6,f7,f8 = cur:fetch() 105 | end 106 | print ("default: ", os.clock() - t1) 107 | assert (cur:close () == 1, "couldn't close cursor object") 108 | 109 | -- using the same table 110 | local cur, err = conn:execute ("select * from fetch_test") 111 | assert (cur, err) 112 | --assert (cur:numrows() == TOTAL_ROWS, "wrong number of rows") 113 | t1 = os.clock() 114 | local t = {} 115 | --for i = 1, cur:numrows() do 116 | --t = cur:fetch (t) 117 | --end 118 | t = cur:fetch(t) 119 | while t do 120 | t = cur:fetch(t) 121 | end 122 | print ("same table: ", os.clock() - t1) 123 | assert (cur:close () == 1, "couldn't close cursor object") 124 | 125 | -- using the same table with alphanumeric keys 126 | local cur, err = conn:execute ("select * from fetch_test") 127 | assert (cur, err) 128 | --assert (cur:numrows() == TOTAL_ROWS, "wrong number of rows") 129 | t1 = os.clock() 130 | local t = {} 131 | --for i = 1, cur:numrows() do 132 | --t = cur:fetch (t,"a") 133 | --end 134 | t = cur:fetch (t, "a") 135 | while t do 136 | t = cur:fetch (t, "a") 137 | end 138 | print ("alpha keys: ", os.clock() - t1) 139 | assert (cur:close () == 1, "couldn't close cursor object") 140 | 141 | -- using the same table with numeric and alphanumeric keys 142 | local cur, err = conn:execute ("select * from fetch_test") 143 | assert (cur, err) 144 | --assert (cur:numrows() == TOTAL_ROWS, "wrong number of rows") 145 | t1 = os.clock() 146 | local t = {} 147 | --for i = 1, cur:numrows() do 148 | --t = cur:fetch (t,"an") 149 | --end 150 | t = cur:fetch (t, "an") 151 | while t do 152 | t = cur:fetch (t, "an") 153 | end 154 | print ("all keys: ", os.clock() - t1) 155 | assert (cur:close () == 1, "couldn't close cursor object") 156 | 157 | -- creating a table 158 | local cur, err = conn:execute ("select * from fetch_test") 159 | assert (cur, err) 160 | --assert (cur:numrows() == TOTAL_ROWS, "wrong number of rows") 161 | t1 = os.clock() 162 | --for i = 1, cur:numrows() do 163 | --local t = cur:fetch{} 164 | --end 165 | while cur:fetch{} do 166 | end 167 | print ("new table: ", os.clock() - t1) 168 | assert (cur:close () == 1, "couldn't close cursor object") 169 | 170 | assert (conn:close () == 1, "couldn't close connection object") 171 | assert (env:close () == 1, "couldn't close environment object") 172 | -------------------------------------------------------------------------------- /tests/postgres.lua: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------- 2 | -- PostgreSQL specific tests and configurations. 3 | -- $Id: postgres.lua,v 1.2 2006/01/25 19:15:21 tomas Exp $ 4 | --------------------------------------------------------------------- 5 | 6 | DEFAULT_USERNAME = "postgres" 7 | 8 | table.insert (CUR_METHODS, "numrows") 9 | table.insert (EXTENSIONS, numrows) 10 | table.insert (CONN_METHODS, "escape") 11 | table.insert (EXTENSIONS, escape) 12 | -------------------------------------------------------------------------------- /tests/sqlite.lua: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------- 2 | -- SQLite specific tests and configurations. 3 | --------------------------------------------------------------------- 4 | 5 | --------------------------------------------------------------------- 6 | -- Produces a SQL statement which completely erases a table. 7 | -- @param table_name String with the name of the table. 8 | -- @return String with SQL statement. 9 | --------------------------------------------------------------------- 10 | function sql_erase_table (table_name) 11 | return string.format ("delete from %s where 1", table_name) 12 | end 13 | 14 | function checkUnknownDatabase(ENV) 15 | -- skip this test 16 | end 17 | 18 | function finalization () 19 | os.execute ("rm -rf "..datasource) 20 | end 21 | 22 | table.insert (CONN_METHODS, "escape") 23 | table.insert (EXTENSIONS, escape) 24 | -------------------------------------------------------------------------------- /tests/sqlite3.lua: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------- 2 | -- SQLite specific tests and configurations. 3 | --------------------------------------------------------------------- 4 | 5 | DROP_TABLE_RETURN_VALUE = 1 6 | 7 | --------------------------------------------------------------------- 8 | -- Produces a SQL statement which completely erases a table. 9 | -- @param table_name String with the name of the table. 10 | -- @return String with SQL statement. 11 | --------------------------------------------------------------------- 12 | function sql_erase_table (table_name) 13 | return string.format ("delete from %s where 1", table_name) 14 | end 15 | 16 | function checkUnknownDatabase(ENV) 17 | -- skip this test 18 | end 19 | 20 | function finalization () 21 | os.execute ("rm -rf "..datasource) 22 | end 23 | 24 | table.insert (CONN_METHODS, "escape") 25 | table.insert (EXTENSIONS, escape) 26 | -------------------------------------------------------------------------------- /tests/to_be_closed_support.lua: -------------------------------------------------------------------------------- 1 | --------------------------------------------------------------------- 2 | -- Lua 5.4 support to to-be-closed variables. 3 | --------------------------------------------------------------------- 4 | 5 | assert(CONN, "Unable to access CONN variable with a connection object!") 6 | 7 | local cursor = CONN:execute("select * from t") 8 | CUR_OK (cursor) 9 | 10 | local connection = ENV:connect (datasource, username, password) 11 | CONN_OK (connection) 12 | 13 | local environment = luasql[driver] () 14 | ENV_OK (environment) -------------------------------------------------------------------------------- /vc6/def.tmpl: -------------------------------------------------------------------------------- 1 | LIBRARY DRIVER.dll 2 | VERSION VERSION_NUMBER 3 | EXPORTS 4 | luaopen_luasqlDRIVER 5 | -------------------------------------------------------------------------------- /vc6/luasql.dsw: -------------------------------------------------------------------------------- 1 | Microsoft Developer Studio Workspace File, Format Version 6.00 2 | # WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! 3 | 4 | ############################################################################### 5 | 6 | Project: "luasqlmysql40_dll"=.\luasqlmysql40_dll.dsp - Package Owner=<4> 7 | 8 | Package=<5> 9 | {{{ 10 | }}} 11 | 12 | Package=<4> 13 | {{{ 14 | }}} 15 | 16 | ############################################################################### 17 | 18 | Project: "luasqlmysql41_dll"=.\luasqlmysql41_dll.dsp - Package Owner=<4> 19 | 20 | Package=<5> 21 | {{{ 22 | }}} 23 | 24 | Package=<4> 25 | {{{ 26 | }}} 27 | 28 | ############################################################################### 29 | 30 | Project: "luasqlmysql50_dll"=.\luasqlmysql50_dll.dsp - Package Owner=<4> 31 | 32 | Package=<5> 33 | {{{ 34 | }}} 35 | 36 | Package=<4> 37 | {{{ 38 | }}} 39 | 40 | ############################################################################### 41 | 42 | Project: "luasqloci8_dll"=.\luasqloci8_dll.dsp - Package Owner=<4> 43 | 44 | Package=<5> 45 | {{{ 46 | }}} 47 | 48 | Package=<4> 49 | {{{ 50 | }}} 51 | 52 | ############################################################################### 53 | 54 | Project: "luasqlodbc_dll"=.\luasqlodbc_dll.dsp - Package Owner=<4> 55 | 56 | Package=<5> 57 | {{{ 58 | }}} 59 | 60 | Package=<4> 61 | {{{ 62 | }}} 63 | 64 | ############################################################################### 65 | 66 | Project: "luasqlpostgres_dll"=.\luasqlpostgres_dll.dsp - Package Owner=<4> 67 | 68 | Package=<5> 69 | {{{ 70 | }}} 71 | 72 | Package=<4> 73 | {{{ 74 | }}} 75 | 76 | ############################################################################### 77 | 78 | Project: "luasqlsqlite_dll"=.\luasqlsqlite_dll.dsp - Package Owner=<4> 79 | 80 | Package=<5> 81 | {{{ 82 | }}} 83 | 84 | Package=<4> 85 | {{{ 86 | }}} 87 | 88 | ############################################################################### 89 | 90 | Global: 91 | 92 | Package=<5> 93 | {{{ 94 | }}} 95 | 96 | Package=<3> 97 | {{{ 98 | }}} 99 | 100 | ############################################################################### 101 | 102 | -------------------------------------------------------------------------------- /vc6/luasqlmysql40_dll.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="luasqlmysql40_dll" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 6 | 7 | CFG=luasqlmysql40_dll - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "luasqlmysql40_dll.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "luasqlmysql40_dll.mak" CFG="luasqlmysql40_dll - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "luasqlmysql40_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") 21 | !MESSAGE "luasqlmysql40_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "luasqlmysql40_dll" 27 | # PROP Scc_LocalPath ".." 28 | CPP=cl.exe 29 | MTL=midl.exe 30 | RSC=rc.exe 31 | 32 | !IF "$(CFG)" == "luasqlmysql40_dll - Win32 Release" 33 | 34 | # PROP BASE Use_MFC 0 35 | # PROP BASE Use_Debug_Libraries 0 36 | # PROP BASE Output_Dir "Release" 37 | # PROP BASE Intermediate_Dir "Release" 38 | # PROP BASE Target_Dir "" 39 | # PROP Use_MFC 0 40 | # PROP Use_Debug_Libraries 0 41 | # PROP Output_Dir "../lib/vc6/luasql" 42 | # PROP Intermediate_Dir "luasqlmysql40_dll/Release" 43 | # PROP Ignore_Export_Lib 0 44 | # PROP Target_Dir "" 45 | # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql40_dll_EXPORTS" /YX /FD /c 46 | # ADD CPP /nologo /MT /W3 /GX /O2 /I "../../external-src/lua50/include" /I "../../external-src/mysql-4.0.26-win32/include" /I "../../compat/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql40_dll_EXPORTS" /FR /YX /FD /c 47 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 48 | # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 49 | # ADD BASE RSC /l 0x416 /d "NDEBUG" 50 | # ADD RSC /l 0x416 /d "NDEBUG" 51 | BSC32=bscmake.exe 52 | # ADD BASE BSC32 /nologo 53 | # ADD BSC32 /nologo 54 | LINK32=link.exe 55 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 56 | # ADD LINK32 lua50.lib libmysql.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 /out:"../bin/vc6/luasql/mysql40.dll" /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/mysql-4.0.26-win32/lib/opt" 57 | 58 | !ELSEIF "$(CFG)" == "luasqlmysql40_dll - Win32 Debug" 59 | 60 | # PROP BASE Use_MFC 0 61 | # PROP BASE Use_Debug_Libraries 1 62 | # PROP BASE Output_Dir "Debug" 63 | # PROP BASE Intermediate_Dir "Debug" 64 | # PROP BASE Target_Dir "" 65 | # PROP Use_MFC 0 66 | # PROP Use_Debug_Libraries 1 67 | # PROP Output_Dir "../lib/vc6/luasql" 68 | # PROP Intermediate_Dir "luasqlmysql40_dll/Debug" 69 | # PROP Ignore_Export_Lib 0 70 | # PROP Target_Dir "" 71 | # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql40_dll_EXPORTS" /YX /FD /GZ /c 72 | # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../external-src/lua50/include" /I "../../external-src/mysql-4.0.26-win32/include" /I "../../compat/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql40_dll_EXPORTS" /YX /FD /GZ /c 73 | # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 74 | # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 75 | # ADD BASE RSC /l 0x416 /d "_DEBUG" 76 | # ADD RSC /l 0x416 /d "_DEBUG" 77 | BSC32=bscmake.exe 78 | # ADD BASE BSC32 /nologo 79 | # ADD BSC32 /nologo 80 | LINK32=link.exe 81 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept 82 | # ADD LINK32 lua50.lib libmysql.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /out:"../bin/vc6/luasql/mysql40d.dll" /pdbtype:sept /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/mysql-4.0.26-win32/lib/debug" 83 | 84 | !ENDIF 85 | 86 | # Begin Target 87 | 88 | # Name "luasqlmysql40_dll - Win32 Release" 89 | # Name "luasqlmysql40_dll - Win32 Debug" 90 | # Begin Group "Source Files" 91 | 92 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 93 | # Begin Source File 94 | 95 | SOURCE="..\..\compat\src\compat-5.1.c" 96 | # End Source File 97 | # Begin Source File 98 | 99 | SOURCE=..\src\ls_mysql.c 100 | # End Source File 101 | # Begin Source File 102 | 103 | SOURCE=..\src\luasql.c 104 | # End Source File 105 | # Begin Source File 106 | 107 | SOURCE=.\mysql.def 108 | # End Source File 109 | # Begin Source File 110 | 111 | SOURCE=.\mysql40.rc 112 | # End Source File 113 | # End Group 114 | # Begin Group "Header Files" 115 | 116 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 117 | # Begin Source File 118 | 119 | SOURCE=..\src\luasql.h 120 | # End Source File 121 | # End Group 122 | # Begin Group "Resource Files" 123 | 124 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 125 | # End Group 126 | # End Target 127 | # End Project 128 | -------------------------------------------------------------------------------- /vc6/luasqlmysql41_dll.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="luasqlmysql41_dll" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 6 | 7 | CFG=luasqlmysql41_dll - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "luasqlmysql41_dll.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "luasqlmysql41_dll.mak" CFG="luasqlmysql41_dll - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "luasqlmysql41_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") 21 | !MESSAGE "luasqlmysql41_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "luasqlmysql41_dll" 27 | # PROP Scc_LocalPath ".." 28 | CPP=cl.exe 29 | MTL=midl.exe 30 | RSC=rc.exe 31 | 32 | !IF "$(CFG)" == "luasqlmysql41_dll - Win32 Release" 33 | 34 | # PROP BASE Use_MFC 0 35 | # PROP BASE Use_Debug_Libraries 0 36 | # PROP BASE Output_Dir "Release" 37 | # PROP BASE Intermediate_Dir "Release" 38 | # PROP BASE Target_Dir "" 39 | # PROP Use_MFC 0 40 | # PROP Use_Debug_Libraries 0 41 | # PROP Output_Dir "../lib/vc6/luasql" 42 | # PROP Intermediate_Dir "luasqlmysql41_dll/Release" 43 | # PROP Ignore_Export_Lib 0 44 | # PROP Target_Dir "" 45 | # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql41_dll_EXPORTS" /YX /FD /c 46 | # ADD CPP /nologo /MT /W3 /GX /O2 /I "../../external-src/lua50/include" /I "../../external-src/mysql-4.1.16-win32/include" /I "../../compat/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql41_dll_EXPORTS" /FR /YX /FD /c 47 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 48 | # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 49 | # ADD BASE RSC /l 0x416 /d "NDEBUG" 50 | # ADD RSC /l 0x416 /d "NDEBUG" 51 | BSC32=bscmake.exe 52 | # ADD BASE BSC32 /nologo 53 | # ADD BSC32 /nologo 54 | LINK32=link.exe 55 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 56 | # ADD LINK32 lua50.lib libmysql.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 /out:"../bin/vc6/luasql/mysql41.dll" /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/mysql-4.1.16-win32/lib/opt" 57 | 58 | !ELSEIF "$(CFG)" == "luasqlmysql41_dll - Win32 Debug" 59 | 60 | # PROP BASE Use_MFC 0 61 | # PROP BASE Use_Debug_Libraries 1 62 | # PROP BASE Output_Dir "Debug" 63 | # PROP BASE Intermediate_Dir "Debug" 64 | # PROP BASE Target_Dir "" 65 | # PROP Use_MFC 0 66 | # PROP Use_Debug_Libraries 1 67 | # PROP Output_Dir "../lib/vc6/luasql" 68 | # PROP Intermediate_Dir "luasqlmysql41_dll/Debug" 69 | # PROP Ignore_Export_Lib 0 70 | # PROP Target_Dir "" 71 | # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql41_dll_EXPORTS" /YX /FD /GZ /c 72 | # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../external-src/lua50/include" /I "../../external-src/mysql-4.1.16-win32/include" /I "../../compat/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql41_dll_EXPORTS" /YX /FD /GZ /c 73 | # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 74 | # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 75 | # ADD BASE RSC /l 0x416 /d "_DEBUG" 76 | # ADD RSC /l 0x416 /d "_DEBUG" 77 | BSC32=bscmake.exe 78 | # ADD BASE BSC32 /nologo 79 | # ADD BSC32 /nologo 80 | LINK32=link.exe 81 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept 82 | # ADD LINK32 lua50.lib libmysql.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /out:"../bin/vc6/luasql/mysql41d.dll" /pdbtype:sept /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/mysql-4.1.16-win32/lib/debug" 83 | 84 | !ENDIF 85 | 86 | # Begin Target 87 | 88 | # Name "luasqlmysql41_dll - Win32 Release" 89 | # Name "luasqlmysql41_dll - Win32 Debug" 90 | # Begin Group "Source Files" 91 | 92 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 93 | # Begin Source File 94 | 95 | SOURCE="..\..\compat\src\compat-5.1.c" 96 | # End Source File 97 | # Begin Source File 98 | 99 | SOURCE=..\src\ls_mysql.c 100 | # End Source File 101 | # Begin Source File 102 | 103 | SOURCE=..\src\luasql.c 104 | # End Source File 105 | # Begin Source File 106 | 107 | SOURCE=.\mysql.def 108 | # End Source File 109 | # Begin Source File 110 | 111 | SOURCE=.\mysql41.rc 112 | # End Source File 113 | # End Group 114 | # Begin Group "Header Files" 115 | 116 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 117 | # Begin Source File 118 | 119 | SOURCE="..\..\compat\src\compat-5.1.h" 120 | # End Source File 121 | # Begin Source File 122 | 123 | SOURCE=..\src\luasql.h 124 | # End Source File 125 | # End Group 126 | # Begin Group "Resource Files" 127 | 128 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 129 | # End Group 130 | # End Target 131 | # End Project 132 | -------------------------------------------------------------------------------- /vc6/luasqlmysql50_dll.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="luasqlmysql50_dll" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 6 | 7 | CFG=luasqlmysql50_dll - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "luasqlmysql50_dll.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "luasqlmysql50_dll.mak" CFG="luasqlmysql50_dll - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "luasqlmysql50_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") 21 | !MESSAGE "luasqlmysql50_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "luasqlmysql50_dll" 27 | # PROP Scc_LocalPath ".." 28 | CPP=cl.exe 29 | MTL=midl.exe 30 | RSC=rc.exe 31 | 32 | !IF "$(CFG)" == "luasqlmysql50_dll - Win32 Release" 33 | 34 | # PROP BASE Use_MFC 0 35 | # PROP BASE Use_Debug_Libraries 0 36 | # PROP BASE Output_Dir "Release" 37 | # PROP BASE Intermediate_Dir "Release" 38 | # PROP BASE Target_Dir "" 39 | # PROP Use_MFC 0 40 | # PROP Use_Debug_Libraries 0 41 | # PROP Output_Dir "../lib/vc6/luasql" 42 | # PROP Intermediate_Dir "luasqlmysql50_dll/Release" 43 | # PROP Ignore_Export_Lib 0 44 | # PROP Target_Dir "" 45 | # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql50_dll_EXPORTS" /YX /FD /c 46 | # ADD CPP /nologo /MT /W3 /GX /O2 /I "../../external-src/lua50/include" /I "../../external-src/mysql-5.0.20a-win32/include" /I "../../compat/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql50_dll_EXPORTS" /FR /YX /FD /c 47 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 48 | # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 49 | # ADD BASE RSC /l 0x416 /d "NDEBUG" 50 | # ADD RSC /l 0x416 /d "NDEBUG" 51 | BSC32=bscmake.exe 52 | # ADD BASE BSC32 /nologo 53 | # ADD BSC32 /nologo 54 | LINK32=link.exe 55 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 56 | # ADD LINK32 lua50.lib libmysql.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 /out:"../bin/vc6/luasql/mysql50.dll" /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/mysql-5.0.20a-win32/lib/opt" 57 | 58 | !ELSEIF "$(CFG)" == "luasqlmysql50_dll - Win32 Debug" 59 | 60 | # PROP BASE Use_MFC 0 61 | # PROP BASE Use_Debug_Libraries 1 62 | # PROP BASE Output_Dir "Debug" 63 | # PROP BASE Intermediate_Dir "Debug" 64 | # PROP BASE Target_Dir "" 65 | # PROP Use_MFC 0 66 | # PROP Use_Debug_Libraries 1 67 | # PROP Output_Dir "../lib/vc6/luasql" 68 | # PROP Intermediate_Dir "luasqlmysql50_dll/Debug" 69 | # PROP Ignore_Export_Lib 0 70 | # PROP Target_Dir "" 71 | # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql50_dll_EXPORTS" /YX /FD /GZ /c 72 | # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../external-src/lua50/include" /I "../../external-src/mysql-5.0.20a-win32/include" /I "../../compat/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlmysql50_dll_EXPORTS" /YX /FD /GZ /c 73 | # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 74 | # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 75 | # ADD BASE RSC /l 0x416 /d "_DEBUG" 76 | # ADD RSC /l 0x416 /d "_DEBUG" 77 | BSC32=bscmake.exe 78 | # ADD BASE BSC32 /nologo 79 | # ADD BSC32 /nologo 80 | LINK32=link.exe 81 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept 82 | # ADD LINK32 lua50.lib libmysql.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /out:"../bin/vc6/luasql/mysql50d.dll" /pdbtype:sept /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/mysql-5.0.20a-win32/lib/debug" 83 | 84 | !ENDIF 85 | 86 | # Begin Target 87 | 88 | # Name "luasqlmysql50_dll - Win32 Release" 89 | # Name "luasqlmysql50_dll - Win32 Debug" 90 | # Begin Group "Source Files" 91 | 92 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 93 | # Begin Source File 94 | 95 | SOURCE="..\..\compat\src\compat-5.1.c" 96 | # End Source File 97 | # Begin Source File 98 | 99 | SOURCE=..\src\ls_mysql.c 100 | # End Source File 101 | # Begin Source File 102 | 103 | SOURCE=..\src\luasql.c 104 | # End Source File 105 | # Begin Source File 106 | 107 | SOURCE=.\mysql.def 108 | # End Source File 109 | # Begin Source File 110 | 111 | SOURCE=.\mysql50.rc 112 | # End Source File 113 | # End Group 114 | # Begin Group "Header Files" 115 | 116 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 117 | # Begin Source File 118 | 119 | SOURCE="..\..\compat\src\compat-5.1.h" 120 | # End Source File 121 | # Begin Source File 122 | 123 | SOURCE=..\src\luasql.h 124 | # End Source File 125 | # End Group 126 | # Begin Group "Resource Files" 127 | 128 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 129 | # End Group 130 | # End Target 131 | # End Project 132 | -------------------------------------------------------------------------------- /vc6/luasqloci8_dll.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="luasqloci8_dll" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 6 | 7 | CFG=luasqloci8_dll - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "luasqloci8_dll.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "luasqloci8_dll.mak" CFG="luasqloci8_dll - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "luasqloci8_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") 21 | !MESSAGE "luasqloci8_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "luasqloci8_dll" 27 | # PROP Scc_LocalPath ".." 28 | CPP=cl.exe 29 | MTL=midl.exe 30 | RSC=rc.exe 31 | 32 | !IF "$(CFG)" == "luasqloci8_dll - Win32 Release" 33 | 34 | # PROP BASE Use_MFC 0 35 | # PROP BASE Use_Debug_Libraries 0 36 | # PROP BASE Output_Dir "Release" 37 | # PROP BASE Intermediate_Dir "Release" 38 | # PROP BASE Target_Dir "" 39 | # PROP Use_MFC 0 40 | # PROP Use_Debug_Libraries 0 41 | # PROP Output_Dir "../lib/vc6/luasql" 42 | # PROP Intermediate_Dir "luasqloci8_dll/Release" 43 | # PROP Ignore_Export_Lib 0 44 | # PROP Target_Dir "" 45 | # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqloci8_dll_EXPORTS" /YX /FD /c 46 | # ADD CPP /nologo /MD /W3 /GX /O2 /I "../../external-src/lua50/include" /I "../../external-src/oci8/oci/include" /I "../../compat/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqloci8_dll_EXPORTS" /FR /YX /FD /c 47 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 48 | # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 49 | # ADD BASE RSC /l 0x416 /d "NDEBUG" 50 | # ADD RSC /l 0x416 /d "NDEBUG" 51 | BSC32=bscmake.exe 52 | # ADD BASE BSC32 /nologo 53 | # ADD BSC32 /nologo 54 | LINK32=link.exe 55 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 56 | # ADD LINK32 lua50.lib oci.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 /out:"../bin/vc6/luasql/oci8.dll" /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/oci8/oci/lib/msvc" 57 | 58 | !ELSEIF "$(CFG)" == "luasqloci8_dll - Win32 Debug" 59 | 60 | # PROP BASE Use_MFC 0 61 | # PROP BASE Use_Debug_Libraries 1 62 | # PROP BASE Output_Dir "Debug" 63 | # PROP BASE Intermediate_Dir "Debug" 64 | # PROP BASE Target_Dir "" 65 | # PROP Use_MFC 0 66 | # PROP Use_Debug_Libraries 1 67 | # PROP Output_Dir "../lib/vc6/luasql" 68 | # PROP Intermediate_Dir "luasqloci8_dll/Debug" 69 | # PROP Ignore_Export_Lib 0 70 | # PROP Target_Dir "" 71 | # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqloci8_dll_EXPORTS" /YX /FD /GZ /c 72 | # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../external-src/lua50/include" /I "../../external-src/oci8/oci/include" /I "../../compat/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqloci8_dll_EXPORTS" /YX /FD /GZ /c 73 | # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 74 | # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 75 | # ADD BASE RSC /l 0x416 /d "_DEBUG" 76 | # ADD RSC /l 0x416 /d "_DEBUG" 77 | BSC32=bscmake.exe 78 | # ADD BASE BSC32 /nologo 79 | # ADD BSC32 /nologo 80 | LINK32=link.exe 81 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept 82 | # ADD LINK32 lua50.lib oci.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /out:"../bin/vc6/luasql/oci8d.dll" /pdbtype:sept /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/oci8/oci/lib/msvc" 83 | 84 | !ENDIF 85 | 86 | # Begin Target 87 | 88 | # Name "luasqloci8_dll - Win32 Release" 89 | # Name "luasqloci8_dll - Win32 Debug" 90 | # Begin Group "Source Files" 91 | 92 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 93 | # Begin Source File 94 | 95 | SOURCE="..\..\compat\src\compat-5.1.c" 96 | # End Source File 97 | # Begin Source File 98 | 99 | SOURCE=..\src\ls_oci8.c 100 | # End Source File 101 | # Begin Source File 102 | 103 | SOURCE=..\src\luasql.c 104 | # End Source File 105 | # Begin Source File 106 | 107 | SOURCE=.\oci8.def 108 | # End Source File 109 | # End Group 110 | # Begin Group "Header Files" 111 | 112 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 113 | # Begin Source File 114 | 115 | SOURCE="..\..\compat\src\compat-5.1.h" 116 | # End Source File 117 | # Begin Source File 118 | 119 | SOURCE=..\src\luasql.h 120 | # End Source File 121 | # End Group 122 | # Begin Group "Resource Files" 123 | 124 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 125 | # End Group 126 | # End Target 127 | # End Project 128 | -------------------------------------------------------------------------------- /vc6/luasqlodbc_dll.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="luasqlodbc_dll" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 6 | 7 | CFG=luasqlodbc_dll - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "luasqlodbc_dll.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "luasqlodbc_dll.mak" CFG="luasqlodbc_dll - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "luasqlodbc_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") 21 | !MESSAGE "luasqlodbc_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "luasqlodbc_dll" 27 | # PROP Scc_LocalPath ".." 28 | CPP=cl.exe 29 | MTL=midl.exe 30 | RSC=rc.exe 31 | 32 | !IF "$(CFG)" == "luasqlodbc_dll - Win32 Release" 33 | 34 | # PROP BASE Use_MFC 0 35 | # PROP BASE Use_Debug_Libraries 0 36 | # PROP BASE Output_Dir "Release" 37 | # PROP BASE Intermediate_Dir "Release" 38 | # PROP BASE Target_Dir "" 39 | # PROP Use_MFC 0 40 | # PROP Use_Debug_Libraries 0 41 | # PROP Output_Dir "../lib/vc6/luasql" 42 | # PROP Intermediate_Dir "luasqlodbc_dll/Release" 43 | # PROP Ignore_Export_Lib 0 44 | # PROP Target_Dir "" 45 | # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlodbc_dll_EXPORTS" /YX /FD /c 46 | # ADD CPP /nologo /MT /W3 /GX /O2 /I "../../external-src/lua50/include" /I "../../compat/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlodbc_dll_EXPORTS" /YX /FD /c 47 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 48 | # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 49 | # ADD BASE RSC /l 0x416 /d "NDEBUG" 50 | # ADD RSC /l 0x416 /d "NDEBUG" 51 | BSC32=bscmake.exe 52 | # ADD BASE BSC32 /nologo 53 | # ADD BSC32 /nologo 54 | LINK32=link.exe 55 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 56 | # ADD LINK32 lua50.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386 /out:"../bin/vc6/luasql/odbc.dll" /libpath:"../../external-src/lua50/lib/dll" 57 | 58 | !ELSEIF "$(CFG)" == "luasqlodbc_dll - Win32 Debug" 59 | 60 | # PROP BASE Use_MFC 0 61 | # PROP BASE Use_Debug_Libraries 1 62 | # PROP BASE Output_Dir "Debug" 63 | # PROP BASE Intermediate_Dir "Debug" 64 | # PROP BASE Target_Dir "" 65 | # PROP Use_MFC 0 66 | # PROP Use_Debug_Libraries 1 67 | # PROP Output_Dir "../lib/vc6/luasql" 68 | # PROP Intermediate_Dir "luasqlodbc_dll/Debug" 69 | # PROP Ignore_Export_Lib 0 70 | # PROP Target_Dir "" 71 | # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlodbc_dll_EXPORTS" /YX /FD /GZ /c 72 | # ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../external-src/lua50/include" /I "../../compat/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlodbc_dll_EXPORTS" /FR /YX /FD /GZ /c 73 | # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 74 | # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 75 | # ADD BASE RSC /l 0x416 /d "_DEBUG" 76 | # ADD RSC /l 0x416 /d "_DEBUG" 77 | BSC32=bscmake.exe 78 | # ADD BASE BSC32 /nologo 79 | # ADD BSC32 /nologo 80 | LINK32=link.exe 81 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept 82 | # ADD LINK32 lua50.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /out:"../bin/vc6/luasql/odbcd.dll" /pdbtype:sept /libpath:"../../external-src/lua50/lib/dll" 83 | 84 | !ENDIF 85 | 86 | # Begin Target 87 | 88 | # Name "luasqlodbc_dll - Win32 Release" 89 | # Name "luasqlodbc_dll - Win32 Debug" 90 | # Begin Group "Source Files" 91 | 92 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 93 | # Begin Source File 94 | 95 | SOURCE="..\..\compat\src\compat-5.1.c" 96 | # End Source File 97 | # Begin Source File 98 | 99 | SOURCE=..\src\ls_odbc.c 100 | # End Source File 101 | # Begin Source File 102 | 103 | SOURCE=..\src\luasql.c 104 | # End Source File 105 | # Begin Source File 106 | 107 | SOURCE=.\odbc.def 108 | # End Source File 109 | # End Group 110 | # Begin Group "Header Files" 111 | 112 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 113 | # Begin Source File 114 | 115 | SOURCE="..\..\compat\src\compat-5.1.h" 116 | # End Source File 117 | # Begin Source File 118 | 119 | SOURCE=..\src\luasql.h 120 | # End Source File 121 | # End Group 122 | # Begin Group "Resource Files" 123 | 124 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 125 | # End Group 126 | # End Target 127 | # End Project 128 | -------------------------------------------------------------------------------- /vc6/luasqlpostgres_dll.dsp: -------------------------------------------------------------------------------- 1 | # Microsoft Developer Studio Project File - Name="luasqlpostgres_dll" - Package Owner=<4> 2 | # Microsoft Developer Studio Generated Build File, Format Version 6.00 3 | # ** DO NOT EDIT ** 4 | 5 | # TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 6 | 7 | CFG=luasqlpostgres_dll - Win32 Debug 8 | !MESSAGE This is not a valid makefile. To build this project using NMAKE, 9 | !MESSAGE use the Export Makefile command and run 10 | !MESSAGE 11 | !MESSAGE NMAKE /f "luasqlpostgres_dll.mak". 12 | !MESSAGE 13 | !MESSAGE You can specify a configuration when running NMAKE 14 | !MESSAGE by defining the macro CFG on the command line. For example: 15 | !MESSAGE 16 | !MESSAGE NMAKE /f "luasqlpostgres_dll.mak" CFG="luasqlpostgres_dll - Win32 Debug" 17 | !MESSAGE 18 | !MESSAGE Possible choices for configuration are: 19 | !MESSAGE 20 | !MESSAGE "luasqlpostgres_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") 21 | !MESSAGE "luasqlpostgres_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") 22 | !MESSAGE 23 | 24 | # Begin Project 25 | # PROP AllowPerConfigDependencies 0 26 | # PROP Scc_ProjName "luasqlpostgres_dll" 27 | # PROP Scc_LocalPath ".." 28 | CPP=cl.exe 29 | MTL=midl.exe 30 | RSC=rc.exe 31 | 32 | !IF "$(CFG)" == "luasqlpostgres_dll - Win32 Release" 33 | 34 | # PROP BASE Use_MFC 0 35 | # PROP BASE Use_Debug_Libraries 0 36 | # PROP BASE Output_Dir "Release" 37 | # PROP BASE Intermediate_Dir "Release" 38 | # PROP BASE Target_Dir "" 39 | # PROP Use_MFC 0 40 | # PROP Use_Debug_Libraries 0 41 | # PROP Output_Dir "../lib/vc6/luasql" 42 | # PROP Intermediate_Dir "luasqlpostgres_dll/Release" 43 | # PROP Ignore_Export_Lib 0 44 | # PROP Target_Dir "" 45 | # ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlpostgres_dll_EXPORTS" /YX /FD /c 46 | # ADD CPP /nologo /MD /W3 /GX /O2 /I "../../external-src/lua50/include" /I "../../external-src/postgresql-7.4.12/src/include" /I "../../external-src/postgresql-7.4.12/src/interfaces/libpq" /I "../../compat/src" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlpostgres_dll_EXPORTS" /YX /FD /c 47 | # ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32 48 | # ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32 49 | # ADD BASE RSC /l 0x416 /d "NDEBUG" 50 | # ADD RSC /l 0x416 /d "NDEBUG" 51 | BSC32=bscmake.exe 52 | # ADD BASE BSC32 /nologo 53 | # ADD BSC32 /nologo 54 | LINK32=link.exe 55 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 56 | # ADD LINK32 lua50.lib libpq.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /machine:I386 /out:"../bin/vc6/luasql/postgres.dll" /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/postgresql-7.4.12/src/interfaces/libpq/Release" 57 | 58 | !ELSEIF "$(CFG)" == "luasqlpostgres_dll - Win32 Debug" 59 | 60 | # PROP BASE Use_MFC 0 61 | # PROP BASE Use_Debug_Libraries 1 62 | # PROP BASE Output_Dir "Debug" 63 | # PROP BASE Intermediate_Dir "Debug" 64 | # PROP BASE Target_Dir "" 65 | # PROP Use_MFC 0 66 | # PROP Use_Debug_Libraries 1 67 | # PROP Output_Dir "../lib/vc6/luasql" 68 | # PROP Intermediate_Dir "luasqlpostgres_dll/Debug" 69 | # PROP Ignore_Export_Lib 0 70 | # PROP Target_Dir "" 71 | # ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlpostgres_dll_EXPORTS" /YX /FD /GZ /c 72 | # ADD CPP /nologo /MDd /W3 /Gm /GX /ZI /Od /I "../../external-src/lua50/include" /I "../../external-src/postgresql-7.4.12/src/include" /I "../../external-src/postgresql-7.4.12/src/interfaces/libpq" /I "../../compat/src" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "luasqlpostgres_dll_EXPORTS" /YX /FD /GZ /c 73 | # ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32 74 | # ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32 75 | # ADD BASE RSC /l 0x416 /d "_DEBUG" 76 | # ADD RSC /l 0x416 /d "_DEBUG" 77 | BSC32=bscmake.exe 78 | # ADD BASE BSC32 /nologo 79 | # ADD BSC32 /nologo 80 | LINK32=link.exe 81 | # ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /pdbtype:sept 82 | # ADD LINK32 lua50.lib libpq.lib wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /dll /debug /machine:I386 /out:"../bin/vc6/luasql/postgresd.dll" /pdbtype:sept /libpath:"../../external-src/lua50/lib/dll" /libpath:"../../external-src/postgresql-7.4.12/src/interfaces/libpq/Release" 83 | 84 | !ENDIF 85 | 86 | # Begin Target 87 | 88 | # Name "luasqlpostgres_dll - Win32 Release" 89 | # Name "luasqlpostgres_dll - Win32 Debug" 90 | # Begin Group "Source Files" 91 | 92 | # PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat" 93 | # Begin Source File 94 | 95 | SOURCE="..\..\compat\src\compat-5.1.c" 96 | # End Source File 97 | # Begin Source File 98 | 99 | SOURCE=..\src\ls_postgres.c 100 | # End Source File 101 | # Begin Source File 102 | 103 | SOURCE=..\src\luasql.c 104 | # End Source File 105 | # Begin Source File 106 | 107 | SOURCE=.\postgres.def 108 | # End Source File 109 | # End Group 110 | # Begin Group "Header Files" 111 | 112 | # PROP Default_Filter "h;hpp;hxx;hm;inl" 113 | # Begin Source File 114 | 115 | SOURCE="..\..\compat\src\compat-5.1.h" 116 | # End Source File 117 | # Begin Source File 118 | 119 | SOURCE=..\src\luasql.h 120 | # End Source File 121 | # End Group 122 | # Begin Group "Resource Files" 123 | 124 | # PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe" 125 | # End Group 126 | # End Target 127 | # End Project 128 | -------------------------------------------------------------------------------- /vc6/mysql.def: -------------------------------------------------------------------------------- 1 | LIBRARY mysql.dll 2 | DESCRIPTION "LuaSQL driver for mysql" 3 | EXPORTS 4 | luaopen_luasqlmysql 5 | -------------------------------------------------------------------------------- /vc6/mysql40.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunarmodules/luasql/8cb68d084c7e9836724a644b8619ad342afc2794/vc6/mysql40.rc -------------------------------------------------------------------------------- /vc6/mysql41.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunarmodules/luasql/8cb68d084c7e9836724a644b8619ad342afc2794/vc6/mysql41.rc -------------------------------------------------------------------------------- /vc6/mysql50.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunarmodules/luasql/8cb68d084c7e9836724a644b8619ad342afc2794/vc6/mysql50.rc -------------------------------------------------------------------------------- /vc6/oci8.def: -------------------------------------------------------------------------------- 1 | LIBRARY oci8.dll 2 | DESCRIPTION "LuaSQL driver for oci8 (Oracle)" 3 | EXPORTS 4 | luaopen_luasqloci8 5 | -------------------------------------------------------------------------------- /vc6/odbc.def: -------------------------------------------------------------------------------- 1 | LIBRARY odbc.dll 2 | DESCRIPTION "LuaSQL driver for odbc" 3 | EXPORTS 4 | luaopen_luasqlodbc 5 | -------------------------------------------------------------------------------- /vc6/postgres.def: -------------------------------------------------------------------------------- 1 | LIBRARY postgres.dll 2 | DESCRIPTION "LuaSQL driver for postgres" 3 | EXPORTS 4 | luaopen_luasqlpostgres 5 | -------------------------------------------------------------------------------- /vc6/postgres.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lunarmodules/luasql/8cb68d084c7e9836724a644b8619ad342afc2794/vc6/postgres.rc -------------------------------------------------------------------------------- /vc6/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Developer Studio generated include file. 3 | // Used by mysql40.rc 4 | // 5 | 6 | // Next default values for new objects 7 | // 8 | #ifdef APSTUDIO_INVOKED 9 | #ifndef APSTUDIO_READONLY_SYMBOLS 10 | #define _APS_NEXT_RESOURCE_VALUE 101 11 | #define _APS_NEXT_COMMAND_VALUE 40001 12 | #define _APS_NEXT_CONTROL_VALUE 1000 13 | #define _APS_NEXT_SYMED_VALUE 101 14 | #endif 15 | #endif 16 | -------------------------------------------------------------------------------- /vc6/sqlite.def: -------------------------------------------------------------------------------- 1 | LIBRARY sqlite.dll 2 | DESCRIPTION "LuaSQL driver for sqlite" 3 | EXPORTS 4 | luaopen_luasqlsqlite 5 | --------------------------------------------------------------------------------