Skip to content

Commit 1af9c43

Browse files
committed
Fix unclosed brace in ODBC error msg
Also adds mention of the experimental ODBC dialect to %mod-odbc.c Bump copyright date.
1 parent 199db78 commit 1af9c43

File tree

1 file changed

+28
-3
lines changed

1 file changed

+28
-3
lines changed

extensions/odbc/mod-odbc.c

+28-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
//=////////////////////////////////////////////////////////////////////////=//
99
//
1010
// Copyright 2010-2011 Christian Ensel
11-
// Copyright 2017-2023 Ren-C Open Source Contributors
11+
// Copyright 2017-2024 Ren-C Open Source Contributors
1212
// REBOL is a trademark of REBOL Technologies
1313
//
1414
// See README.md and CREDITS.md for more information.
@@ -27,13 +27,38 @@
2727
//
2828
// The driver is made to handle queries which look like:
2929
//
30-
// ["select * from tables where (name = ?) and (age = ?)" {Brian} 42]
30+
// ["select * from tables where (name = ?) and (age = ?)" {Brian} 49]
3131
//
3232
// The ? notation for substitution points is what is known as a "parameterized
3333
// query". The reason it is supported at the driver level (instead of making
3434
// the usermode Rebol code merge into a single string) is to make it easier to
3535
// defend against SQL injection attacks. This way, the scheme code does not
3636
// need to worry about doing SQL-syntax-aware string escaping.
37+
//
38+
// An experimental SQL dialect is implemented in the usermode portion of the
39+
// extension, which allows you to write your SQL as a BLOCK! of words and
40+
// other symbols, forming the words as text, turning GROUP!s into parentheses
41+
// and doing parameterized variable subsitutions with ^META-WORD!s. So if you
42+
// were to write the Rebol code:
43+
//
44+
// fptitle: "Title"
45+
// fpinits: "Inits"
46+
// fpname: "Name"
47+
//
48+
// sql-execute [
49+
// INSERT INTO fps (title, fname, surname)
50+
// VALUES (^fptitle, ^fpinits, ^fpname)
51+
// ]
52+
//
53+
// What gets passed to the driver will look like:
54+
//
55+
// [
56+
// {INSERT INTO fps (title, fname, surname) VALUES (?, ?, ?)}
57+
// "Title" "Inits" "Name"
58+
// ]
59+
//
60+
// (Again, this is experimental, and the choice of ^META-WORD! is not final.)
61+
//
3762

3863
#include "reb-config.h"
3964

@@ -226,7 +251,7 @@ Value* Error_ODBC_Core(
226251

227252
case SQL_ERROR:
228253
return rebValue(
229-
"make error! {Internal ODBC extension error (bad diag record #)"
254+
"make error! {Internal ODBC extension error (bad diag record #)}"
230255
);
231256

232257
case SQL_NO_DATA:

0 commit comments

Comments
 (0)