tdbc_sqlite3.n 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. '\"
  2. .\" tdbc_sqlite3.n --
  3. .\"
  4. .\" Copyright (c) 2008 by Kevin B. Kenny.
  5. .\"
  6. .\" See the file "license.terms" for information on usage and redistribution of
  7. .\" this file, and for a DISCLAIMER OF ALL WARRANTIES.
  8. .TH "tdbc::sqlite3" n 8.6 Tcl "Tcl Database Connectivity"
  9. .\" .so man.macros
  10. .if t .wh -1.3i ^B
  11. .nr ^l \n(.l
  12. .ad b
  13. .\" # BS - start boxed text
  14. .\" # ^y = starting y location
  15. .\" # ^b = 1
  16. .de BS
  17. .br
  18. .mk ^y
  19. .nr ^b 1u
  20. .if n .nf
  21. .if n .ti 0
  22. .if n \l'\\n(.lu\(ul'
  23. .if n .fi
  24. ..
  25. .\" # BE - end boxed text (draw box now)
  26. .de BE
  27. .nf
  28. .ti 0
  29. .mk ^t
  30. .ie n \l'\\n(^lu\(ul'
  31. .el \{\
  32. .\" Draw four-sided box normally, but don't draw top of
  33. .\" box if the box started on an earlier page.
  34. .ie !\\n(^b-1 \{\
  35. \h'-1.5n'\L'|\\n(^yu-1v'\l'\\n(^lu+3n\(ul'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  36. .\}
  37. .el \}\
  38. \h'-1.5n'\L'|\\n(^yu-1v'\h'\\n(^lu+3n'\L'\\n(^tu+1v-\\n(^yu'\l'|0u-1.5n\(ul'
  39. .\}
  40. .\}
  41. .fi
  42. .br
  43. .nr ^b 0
  44. ..
  45. .\" # CS - begin code excerpt
  46. .de CS
  47. .RS
  48. .nf
  49. .ta .25i .5i .75i 1i
  50. ..
  51. .\" # CE - end code excerpt
  52. .de CE
  53. .fi
  54. .RE
  55. ..
  56. .BS
  57. .SH "NAME"
  58. tdbc::sqlite3 \- TDBC driver for the SQLite3 database manager
  59. .SH "SYNOPSIS"
  60. package require \fBtdbc::sqlite3 1.0\fR
  61. .sp
  62. \fBtdbc::sqlite3::connection create\fR \fIdb\fR \fIfileName\fR ?\fI-option value...\fR?
  63. .BE
  64. .SH "DESCRIPTION"
  65. .PP
  66. The \fBtdbc::sqlite3\fR driver provides a database interface that conforms
  67. to Tcl DataBase Connectivity (TDBC) and allows a Tcl script to connect
  68. to a SQLite3 database. It is also provided
  69. as a worked example of how to write a database driver in Tcl, so that
  70. driver authors have a starting point for further development.
  71. .PP
  72. Connection to a SQLite3 database is established by invoking
  73. \fBtdbc::sqlite3::connection create\fR, passing it a string to be used
  74. as the connection handle followed by the file name of
  75. the database. The side effect of \fBtdbc::sqlite3::connection
  76. create\fR is to create a new database connection..
  77. As an alternative, \fBtdbc::sqlite::connection new\fR may be used to create
  78. a database connection with an automatically assigned name. The return value
  79. from \fBtdbc::sqlite::connection new\fR is the name that was chosen for the
  80. connection handle. See
  81. \fBtdbc::connection(n)\fR for the details of how to use the connection
  82. to manipulate a database.
  83. .SH "CONFIGURATION OPTIONS"
  84. .PP
  85. The standard configuration options \fB-encoding\fR, \fB-isolation\fR,
  86. \fB-readonly\fR and \fB-timeout\fR are all recognized, both on
  87. \fBtdbc::sqlite3::connection create\fR and on the \fBconfigure\fR
  88. method of the resulting connection.
  89. .PP
  90. Since the encoding of a SQLite3 database is always well known, the
  91. \fB-encoding\fR option accepts only \fButf-8\fR as an encoding and
  92. always returns \fButf-8\fR for an encoding. The actual encoding may be
  93. set using a SQLite3 \fBPRAGMA\fR statement when creating a new
  94. database.
  95. .PP
  96. Only the isolation levels \fBreaduncommitted\fR and \fBserializable\fR
  97. are implemented. Other isolation levels are promoted to
  98. \fBserializable\fR.
  99. .PP
  100. The \fB-readonly\fR flag is not implemented. \fB-readonly 0\fR is
  101. accepted silently, while \fB-readonly 1\fR reports an error.
  102. .SH "BUGS"
  103. If any column name is not unique among the columns in a result set, the
  104. results of \fB-as dicts\fR returns will be missing all but the rightmost
  105. of the duplicated columns. This limitation can be worked around by adding
  106. appropriate \fBAS\fR clauses to \fBSELECT\fR statements to ensure that
  107. all returned column names are unique. Plans are to fix this bug by using
  108. a C implementation of the driver, which will also improve performance
  109. significantly.
  110. .SH "SEE ALSO"
  111. tdbc(n), tdbc::connection(n), tdbc::resultset(n), tdbc::statement(n)
  112. .SH "KEYWORDS"
  113. TDBC, SQL, SQLite3, database, connectivity, connection
  114. .SH "COPYRIGHT"
  115. Copyright (c) 2008 by Kevin B. Kenny.
  116. .\" Local Variables:
  117. .\" mode: nroff
  118. .\" End:
  119. .\"