\documentclass[]{article}
\usepackage{amsmath,graphicx,supertabular,hyperref,tabularx,ifthen}
\title{TIP \#376: Bundle sqlite3 and tdbc::sqlite3 Packages}
\date{September 14, 2010}
\author{Don Porter, D. Richard Hipp, Kevin Kenny}
\urlstyle{sf}
\setlength{\parskip}{1ex}
\setlength{\parindent}{0pt}
\def\tipversion$#1${\texttt{\$#1\$}}
\def\tiplangle#1{\ensuremath{<}}
\def\tiprangle#1{\ensuremath{>}}
\def\tipbar#1{\ensuremath{|}}
\def\tipmail#1#2{\(\langle\){\small\expandafter\url{#1@#2}}\(\rangle\)}
\ifx\pdfoutput\undefined
\newcommand{\tipimage}[2]{\typeout{Make sure you download #1.eps}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.eps}}{\includegraphics[width=0.8\textwidth]{#1.eps}}}
\newcommand{\tipxref}[1]{}
\newcommand{\tipxrefend}{}
\else
\newcommand{\tipimage}[2]{\typeout{Make sure you create #1.pdf}\ifthenelse{\lengthtest{0.8\textwidth>#2}\and\lengthtest{0pt<#2}}{\includegraphics{#1.pdf}}{\includegraphics[width=0.8\textwidth]{#1.pdf}}}
\pdfcatalog{/PageMode /UseOutlines}
\newcommand{\tipxref}[1]{\pdfannotlink attr {/C [0.5 0.5 1.0] /Border [0 0 1]} goto name {#1}}
\newcommand{\tipxrefend}{\pdfendlink}
\fi
\newenvironment{tipabstract}{\begin{abstract}}{\end{abstract}}
\begin{document}\maketitle
\begin{center}\begin{tabularx}{\linewidth}{|r@{: }X|}\hline
\textbf{TIP \#376}&\textbf{Bundle sqlite3 and tdbc::sqlite3 Packages}\\\hline
Author&

Don Porter \tipmail{dgp}{users.sf.net}
\par
D. Richard Hipp \tipmail{drh}{hwaci.com}
\par
Kevin Kenny \tipmail{kennykb}{acm.org}
\\
Created&Tuesday, \(\text{14}^{\text{th}}\) September 2010\\
Type&Project\\
Tcl Version&\(8.6\)\\
State&Final\\
Vote&Done\\
Version&\tipversion$Revision: 1.5 $\\
Post History&\\
\hline\end{tabularx}\end{center}
\thispagestyle{empty}\pagestyle{empty}
\begin{tipabstract}

This TIP proposes the packages \textbf{sqlite3} and \textbf{tdbc::sqlite3} be re-distributed as part of the Tcl source code distribution.
\end{tipabstract}
\tableofcontents\setcounter{page}{0}\clearpage\pagestyle{plain}

\section{Background}

Starting with the 8.6.* releases of Tcl, a collection of third party packages are being redistributed as part of the Tcl source code distribution under the directory \textit{tcl/pkgs/}. This is partial fulfillment of the long-awaited \textit{batteries included} vision for Tcl releases. The current collection of redistributed packages is Itcl \cite{tip50}, Thread \cite{tip364}, and tdbc \cite{tip308}.

The sqlite3 package is perhaps the most striking example of a Tcl extension that has grown to eclipse Tcl itself. Created and maintained by TCT emeritus D. Richard Hipp, it should require little explanation here.

The tdbc::sqlite3 package provides the driver functionality to use the facilities provided by sqlite3 as the backend of tdbc operations. Created and maintained by Kevin Kenny of the TCT, it should also be familiar to Tcl insiders.

\section{Proposal}

Adapt release operations as needed so that the latest releases of the \textbf{sqlite3} and \textbf{tdbc::sqlite3} packages are included in releases of Tcl 8.6.*.

\section{Expected Benefits}

Distribution of the \textbf{tdbc} package without any backend drivers has quite limited utility. Adding these two packages to the distributed set provides at least one fully working backend with no third-party dependencies. This permits testing and demonstrating the capabilities of \textbf{tdbc} everywhere it goes.

By including \textbf{sqlite3} in the Tcl source code distribution, Tcl can take a place alongside PHP and Python on the list of famous users of SQLite [\url{http://www.sqlite.org/famous.html}]. Since SQLite is now easily more broadly esteemed than Tcl itself, this can only help our public image.

The package \textbf{tdbc::sqlite3} is itself written entirely in Tcl. Unlike the packages so far chosen for redistribution under \textit{tcl/pkgs/}, it contains no C code. The \textit{tcl/pkgs/} harness and the TEA or tclconfig systems it descends from have so far not paid sufficient attention to this case. Including this package will force those systems over time to better support that common implementation case. This can only make package support tools better for more package authors. Also, as support for such packages under \textit{tcl/pkgs/} matures, the large collection of packages that have been distributed with Tcl on a more ad hoc basis, including \textbf{tcltest}, \textbf{msgcat}, \textbf{http}, \textbf{platform}, and \textbf{platform::shell}, may be able to migrate to new places under the \textit{tcl/pkgs/} framework. This may eventually lead to the ability to selectively take packages from tcllib for redistribution with Tcl.

\section{Copyright}

This document has been placed in the public domain.

\section{Colophon}

\textit{TIP AutoGenerator --- written by Donal K. Fellows}
\begin{thebibliography}{TIP \#3}
\addcontentsline{toc}{section}{References}
\bibitem[TIP \#50]{tip50}
Kevin Kenny,
Mark Harrison,
Jeff Hobbs,
Andreas Kupries,
Karl Lehenbauer,
Michael McLennan,
Don Porter,
Brent Welch,
\emph{Bundle [incr Tcl] with the Core Tcl distribution},
on-line at \url{http://purl.org/tcl/tip/50.html}
\bibitem[TIP \#308]{tip308}
Kevin B. Kenny,
Artur Trzewik,
Andreas Leitgeb,
Donal K. Fellows,
\emph{Tcl Database Connectivity (TDBC)},
on-line at \url{http://purl.org/tcl/tip/308.html}
\bibitem[TIP \#364]{tip364}
Donal K. Fellows,
\emph{Threading Support: Configuration and Package},
on-line at \url{http://purl.org/tcl/tip/364.html}
\end{thebibliography}
\end{document}
