summaryrefslogtreecommitdiff
path: root/rcirc-sqlite.texi
blob: 969b4b1b208df13fa7b34c922ac57da85729d7e8 (plain)
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
\input texinfo    @c -*- texinfo -*-
@c %**start of header
@setfilename rcirc-sqlite.info
@settitle rcirc logging in SQLite
@documentencoding UTF-8
@documentlanguage en
@c %**end of header

@dircategory Emacs misc features
@direntry
* rcirc-sqlite: (rcirc-sqlite). rcirc logging in SQLite.
@end direntry

@finalout
@titlepage
@title rcirc logging in SQLite
@author Matto Fransen
@end titlepage

@contents

@ifnottex
@node Top
@top rcirc logging in SQLite
@end ifnottex

@menu
* Introduction::
* Requirements::
* Installation and activation::
* Customization::
* Commands::
* The buffer @code{*rcirc log*}::
* Inner workings::
* Database schema::
* GNU Free Documentation License::
* Command and Function Index::
* Variable Index::
* Key bindings::

@detailmenu
--- The Detailed Node Listing ---

Installation and activation

* Installation::
* Activation::

Commands

* Summery of the commands::
* View the logs::
* Full text search and load the result in a buffer::
* Stats::

Inner workings

* Delay::

@end detailmenu
@end menu

@node Introduction
@chapter Introduction

@code{rcirc} is a default, simple IRC client in Emacs. @code{rcirc} can be enabled to
log the IRC chats, it logs to files.

This minor mode, when activated, diverts the rcirc logs to a SQLite
database.

It also comes with some functionality to query the SQLite database.

@node Requirements
@chapter Requirements

@code{rcirc-sqlite} relies on the capability of Emacs to work together
with SQLite. It makes use of the variable @code{rcirc-log-time-format},
which is introduced in Emacs version 30.1.

To use rcirc-sqlite:

@itemize
@item
Emacs must be compiled with the SQLite capability.
@item
SQLite 3 must be installed on the system.
@item
rcirc must have the option to set the variable @code{rcirc-log-time-format}.
@end itemize

@node Installation and activation
@chapter Installation and activation

@menu
* Installation::
* Activation::
@end menu

@node Installation
@section Installation

@node Install from GNU ELPA
@subsection Install from GNU ELPA
The GNU ELPA package name is: @code{rcirc-sqlite}.

To install the package:

@itemize
@item
@code{M-x package-refresh-contents}
@item
@code{M-x package-install}
@end itemize

and search for @code{rcirc-sqlite}.

Or use @code{use-package}:

@lisp
(use-package rcirc-sqlite
    :ensure t
    :config
    (add-hook 'rcirc-mode-hook #'rcirc-sqlite-log-mode))
@end lisp

@node Manual installation
@subsection Manual installation
Create a directory for the package.

@code{mkdir ~/.emacs.d/manualpackages}

Add this directory as a load path to your init file:

@lisp
(add-to-list 'load-path "~/.emacs.d/manualpackages")
@end lisp

Re-evaluate your init file or restart Emacs, whatever you prefer.

@ref{Requirements} describes the requirements.

@node Activation
@section Activation
@findex rcirc-sqlite-log-mode

@deffn Command rcirc-sqlite-log-mode
Activates or deactivates @code{rcirc-sqlite}.
@end deffn

Issue the command @code{rcirc-sqlite-log-mode} to manually start
@code{rcirc-sqlite}.  This command toggles between activation
and deactivation of @code{rcirc-sqlite}. 

To start @code{rcirc-sqlite} automatically when @code{rcirc}
is started, add the following to your init file:

@lisp
(require 'rcirc-sqlite)
(add-hook 'rcirc-mode-hook #'rcirc-sqlite-log-mode)
@end lisp

While @code{rcirc-sqlite} is activated, @code{rcirc} will no longer
write the logs to files, until @code{rcirc-sqlite} is deactivated.
Deactivate @code{rcirc-sqlite} using the command
@code{rcirc-sqlite-log-mode} again.

The logging must be enabled in @code{rcirc}.
To do this, add for example the following to your init file:

@lisp
(setq rcirc-log-flag t)
@end lisp

@node Customization
@chapter Customization

To customize @code{rcirc-sqlite} run @code{M-x customize-group rcirc-sqlite},
or use @code{(setopt ...)} in your init file, like @code{/.emacs}.
For example:

@lisp
(setopt rcirc-sqlite-rows 100)
@end lisp

The user may customize the following options.

@defopt rcirc-sqlite-database
The file in which SQLite stores the database.
@end defopt

@vindex rcirc-sqlite-database

The file in which SQLite stores the database can be customized.

The default file is @file{ricirc-log.db}, located in the default Emacs
directory (e.g., @file{~/.emacs.d/ricirc-log.db}).

Set this option to use a different file.

@defopt rcirc-sqlite-time-format
The format for the date and time in the buffer @code{*rcirc log*}.
@end defopt

@vindex rcirc-sqlite-time-format

The variable @code{rcirc-sqlite-time-format} describes the date and
time format which is used when displaying the chat messages.

This variable only influences how the date and time is formatted
in the buffer @code{*rcirc log*}.

The default format is @code{%Y-%m-%d %H:%M}.

Set this option to use a different time format in the buffer
@code{*rcirc log*}.

@defopt rcirc-sqlite-rows
The default maximum number of rows when viewing logs.
@end defopt
@vindex rcirc-sqlite-rows

The variable @code{rcirc-sqlite-rows} describes the maximum number
of rows to display when viewing the chat logs.

This only affects when viewing the chat logs. Search results are
always shown unabridged.

@ref{View the logs} describes the command to view the logs.

The default value is 200 rows.

Set this option to change the default number of lines.

@defopt rcirc-sqlite-channel-column-width
The default column width of the channel column in the buffer
@code{*rcirc log*}.
@end defopt
@vindex rcirc-sqlite-channel-column-width

The variable @code{rcirc-sqlite-channel-column-width} describes the
default width of the column that displays the channel names.

The default value is 40 chars.

Change this option to let the channel names be shown in a smaller or
wider column in the buffer @code{*rcirc log*}.

@ref{The buffer @code{*rcirc log*}} has more information on this buffer.

@defopt rcirc-sqlite-register
The register to store messages.
@end defopt

@vindex rcirc-sqlite-register

The variable @code{rcirc-sqlite-register} assigns the register
to store chat messages in.

The user selects a message from the list of messages in the
buffer @code{*rcirc log*}.
Depending on the command, the chat message either overwrites
the current contents of the register, or is appended to it.

@ref{Collect one or more messages in a register}

The default register is @code{r}.

Change this option when you have assigned this register for
a different use.

@node Commands
@chapter Commands

@menu
* Summery of the commands::
* View the logs::
* Full text search and load the result in a buffer::
* Toggle display of the server in the channel name:: 
* Change the selected logs in the log-buffer::
* Copy a message to the kill-ring::
* Collect one or more messages in a register::
* Logs from a specific nick::
* Browse URL in the message::
* Stats::
@end menu

@node Summery of the commands
@section Summery of the commands

@itemize
@item
@code{M-x rcirc-sqlite-view-log}: display the logs.
@item
@code{M-x rcirc-sqlite-text-search}: perform full text search in the logs.
@item
@code{M-x rcirc-sqlite-logs-from-nick}: display the logs from a specific nick.
@item
@code{M-x rcirc-sqlite-stats}: displays some stats.
@end itemize

These commands result in logs displayed in the buffer @code{*rcirc
log*}. In that buffer you can use the key bindings for more actions.
These actions are described in the sections:

@itemize
@item @ref{Toggle display of the server in the channel name}
@item @ref{Change the selected logs in the log-buffer}
@item @ref{Copy a message to the kill-ring}
@item @ref{Collect one or more messages in a register}
@item @ref{Browse URL in the message}
@end itemize

The stats view offer some drill-down options and can be a good
starting point to explore your logs.

@node View the logs
@section View the logs
@findex rcirc-sqlite-view-log

@defun rcirc-sqlite-view-log channel &optional unlimited offset limit
Display the logs in a new buffer.
@end defun

Issue the command @code{M-x rcirc-sqlite-view-log} to view the logs
of a specific channel.  Default this command shows the last 200
lines.  This number can be changed by setting the variable
@code{rcirc-sqlite-rows}. 

This command prompts the user for the channel and provides a list
of available channels.  Choose a channel using completion. 
Choose the option @code{All channels} to show the last 200 lines of the
chat log of @strong{all} channels.

Next, the user is prompted to choose a time range, using
completion.  When a range is chosen, the last 200 lines the chat log
from that range are shown.  Choose the option @code{Anytime} or the
last 90, 60, 30, or 7 days to get the most recent 200 lines.

The buffer @code{*rcirc log*} displays the chat logs.

@subheading Optional arguments

This function has three optional arguments, @code{unlimited},
@code{offset}, and @code{limit}.

@itemize
@item
@code{unlimited}
When non nil, @code{rcirc-sqlite-view-log} will show @strong{all}
log lines in the database of the channel.
@item
@code{offset} and @code{limit}
Use @code{offset} and @code{limit} to select a number of lines from
the log lines in the database of the channel.
@end itemize

@node Full text search and load the result in a buffer
@section Full text search and load the result in a buffer
@findex rcirc-sqlite-text-search

@defun rcirc-sqlite-text-search query channel nick
Perform full text search.
@end defun

Issue the command @code{M-x rcirc-sqlite-text-search} to perform
full text search in the logs.

When this command is issued:

@itemize
@item
The user is prompted for a search string.
@item
The user is prompted to choose a channel (through completion).
@item
The user is prompted to choose a time range (through completion).
@item
The user is prompted to choose a nick (through completion).
@end itemize

When a channel is chosen, the search is performed within the
chat logs of that specific channel.  Choose @code{All channels} to
search independent of the channel.

When a time range is chosen, the search is performed within the
chat messages that were send during the chosen range.  When
@code{Anytime} is chosen, no filtering on date/time takes place.

When a nick is chosen, the search is performed within the
chats send by a specific nick.  Choose @code{All nicks} to search
independent of the sender.

The search string is used to do a full text search in the SQLite
database.  When the search string is @code{foo}, chat messages
containing the word @code{foo} will be found, but chat messages
containing the word @code{foobar} will not be found.

To search for both @code{foo} and @code{foobar}, use the search
string @code{foo*}.

Likewise, to search for URLs, use something like @code{"http*"}
to search for @code{"http://"} as well as for @code{"https://"}.

For more formatting of the search see the chapter
@code{Full-text Query Syntax} of the SQLite documentation (see
@uref{https://www.sqlite.org/fts5.html}).

The buffer @code{*rcirc log*} displays the search results.

@node Toggle display of the server in the channel name
@section Toggle display of the server in the channel name
@kindex (
@kindex )

The buffer @code{*rcirc log*} shows the results from the latest query.

To suprress the display of the server name in the channel name,
use the key @key{(}.

To activate the display of the server name in the channel name,
use the key @key{)}.

@node Change the selected logs in the log-buffer
@section Change the selected logs in the log-buffer

The buffer @code{*rcirc log*} shows the results from the latest query.
Move the point on this buffer up or down to select a chat message.

Use one of the key bindings to change the selected logs.

@node Change the view to a specific day
@subsection Change the view to a specific day
@findex rcirc-sqlite-single-day
@kindex RET

Move the point in the buffer @code{*rcirc log*} up or down to select a
chat message.

Activate the command `rcirc-sqlite-single-day' with the key @key{RET}
or mouse button 1.

The command switches the view to the logs with the same channel and
the same date as the selected chat message.

This can be useful to get some context around a specific search result.

@node Change the view to a specific day and the next day
@subsection Change the view to a specific day and the next day
@findex rcirc-sqlite-next-day
@kindex >

Move the point in the buffer @code{*rcirc log*} up or down to select a
chat message.

Activate the command `rcirc-sqlite-next-day' with the key @key{>}.

The command switches the view to the logs with the same channel and
the same date and the next day as the selected chat message.

@node Change the view to a specific day and the previous day
@subsection Change the view to a specific day and the previous day
@findex rcirc-sqlite-previous-day
@kindex ^

Move the point in the buffer @code{*rcirc log*} up or down to select a
chat message.

Activate the command `rcirc-sqlite-previous-day' with the key @key{^}.

The command switches the view to the logs with the same channel and
the same date and the previous day as the selected chat message.

@node Change the view to a specific day and the next days
@subsection Change the view to a specific day and the next days
@findex rcirc-sqlite-all-next-days
@kindex a

Move the point in the buffer @code{*rcirc log*} up or down to select a
chat message.

Activate the command `rcirc-sqlite-all-next-days' with
the key @key{a}.

The command switches the view to the logs with the same channel and
the same date or later as the selected chat message.

@node Change the view to a specific day and a specific nick
@subsection Change the view to a specific day and a specific nick
@findex rcirc-sqlite-single-nick
@kindex <

Move the point in the buffer @code{*rcirc log*} up or down to select a
chat message.

Activate the command `rcirc-sqlite-single-nick' with
the key @key{<}.

The command switches the view to the logs with the same channel, the
same nick, and the same date as the selected chat message.

@node Copy a message to the kill-ring
@section Copy a message to the kill-ring
@findex rcirc-sqlite-kill-insert
@kindex c

Move the point in the buffer @code{*rcirc log*} up or down to select a
chat message.

Activate the command `rcirc-sqlite-kill-insert' with the key
@key{c} to insert the selected message in the kill-ring.

This command copies the chat message with a some markup, fit to use
in e.g., org mode.

@node Collect one or more messages in a register
@section Collect one or more messages in a register 
@findex rcirc-sqlite-register-insert
@findex rcirc-sqlite-register-append'
@kindex R
@kindex r

Move the point in the buffer @code{*rcirc log*} up or down to select a
chat message.

Activate the command `rcirc-sqlite-register-insert' with the key
@key{R} to insert the selected message in a register. This overwrites
the current contents of the register.

Activate the command `rcirc-sqlite-register-append' with the key
@key{r} to append the selected message to a register.

The commands insert the chat message with a some markup, fit to use in
e.g., org mode.

The default register that is used for this is register `r'. Change the
default register by setting the variable `rcirc-sqlite-register' to a
different register.

@ref{Customization}

You can insert the contents of the register into any buffer with
`insert-register' (`C-x r i <register>'). For the default register `r'
this is: `C-x r i r'.

Whatever you store in a register remains there until you store
something else in that register, or until you close Emacs.

@xref{Registers,,,emacs,Emacs manual}

@subheading Example workflow

Explore the logs, for example with the search option, and start
collecting messages.

Store the first message of your interest with the
command `rcirc-sqlite-register-insert' (key: @key{R}), overwriting
anything that was in this register.

Search for the next message of your interest, and
issue the command `rcirc-sqlite-register-append' (key: @key{r}).

Repeat appending until done.

Open a note, for example in denote, org, or org-roam, and
insert your collected chat messages with
`insert-register' (`C-x r i <register>').

@node Logs from a specific nick
@section  Logs from a specific nick
@findex rcirc-sqlite-logs-from-nick

@defun rcirc-sqlite-logs-from-nick
Display the logs from a specific nick
@end defun

Issue the command @code{rcirc-sqlite-logs-from-nick} to request the
logs of a specific nick.

The user is prompted to select a nick, using completion.

Next, the user is prompted to select a time range, using completion.
The options are:

@itemize
@item
Anytime
@item
Last 90 days
@item
Last 60 days
@item
Last 30 days
@item
Last 7 days
@item
Manually select range
@end itemize

When the option @code{Anytime} is chosen, no filtering takes
place.

When the latest 90, 60, 30, or 7 days is chosen, the logs from that
time range are shown.

The option @code{manually select range} prompts the user to select a
start and a end of a time range, using the org date picker.  Use the
org calendar commands to select a date and time.


@node Browse URL in the message
@section Browse URL in the message
@findex rcirc-sqlite-browse-url-from-message
@kindex b

Move the point in the buffer @code{*rcirc log*} up or down to select a
chat message.

Activate the command `rcirc-sqlite-browse-url-from-message' with the key
@key{b} to browse to the first URL in the selected message.

@node Stats
@section Stats
@findex rcirc-sqlite-stats
@findex rcirc-sqlite-view-drill-down
@findex rcirc-sqlite-stats-per-month

@defun rcirc-sqlite-stats nick
Create overview with some stats
@end defun

Issue the command @code{M-x rcirc-sqlite-stats} to get an overview
of the number of rows (messages) in the database.

The user is prompted for a nick.  Choose a nick through completion.

When a nick is chosen, the buffer @code{*rcirc log*} is opened and
lists each channel with one or more chat messages from that nick,
together with the number of chat messages from that nick.

When @code{All nicks} is chosen, the buffer shows the row count
for each channel in the database.

When @code{Nicks per channel} is chosen, the buffer shows for
each channel the number of unique nicks.

When @code{Channels per nick} is chosen, the buffer shows for
each nick the number of channels with messages from this nick.

@defun rcirc-sqlite-view-drill-down
Drill-down to more details
@end defun

Use drill-down in the buffer showing the stats.  This will show more
details.

@table @asis
@item @kbd{RET}
@kindex RET
Drill-down

@item @kbd{mouse-1}
@kindex mouse-1
Drill-down
@end table

The drill-down options make the command @code{rcirc-sqlite-stats}
a nice starting point to explore your logs.

@defun rcirc-sqlite-stats-per-month
Create overview of the number of rows per month.
@end defun

Issue the command @code{M-x rcirc-sqlite-stats-per-month} to get an
overview of the number of rows (messages) in the database, summerized
per month.

Drill down to the number of rows summerized per day of the selected
month, and from there drill down to all messages of the selected day.

@node The buffer @code{*rcirc log*}
@chapter The buffer @code{*rcirc log*}

The buffer @code{*rcirc log*} is used to show the output of the
database queries. This buffer uses a derived mode from the
@code{tabulated-list-mode}.

Suprress the display of the server name in the channel name with the
key @kbd{(}, or activate the display of the server name with the key
@kbd{)}.

Move up and down in this buffer to select a chat message.
Then you can use the following key bindings to activate
some commands.

@table @asis
@item @kbd{RET} @code{rcirc-sqlite-single-day}
@item @kbd{>} @code{rcirc-sqlite-next-day}
@item @kbd{^} @code{rcirc-sqlite-previous-day}
@item @kbd{a} @code{rcirc-sqlite-all-next-days}
@item @kbd{b} @code{rcirc-sqlite-browse-url-from-message}
@item @kbd{<} @code{rcirc-sqlite-single-nick}
@item @kbd{c} @code{rcirc-sqlite-kill-insert}
@item @kbd{R} @code{rcirc-sqlite-register-insert}
@item @kbd{r} @code{rcirc-sqlite-register-append}
@end table

For a description of these commands, see the following chapters.

@ref{Change the selected logs in the log-buffer}

@ref{Copy a message to the kill-ring}

@ref{Collect one or more messages in a register}

@ref{Browse URL in the message}

The default key bindings of the
@code{tabulated-list-mode} are also available in this buffer.

Some examples of these key bindings:

@table @asis
@item @kbd{S} (@code{Sort})
@kindex S
@findex Sort
Sort the buffer according to the values of the column of point.

Use a numeric prefix argument @var{n} to sort the buffer according to
the values of the @var{n}-th column from point.  Repeat to sort in the
alternate order (ascending or descending).

@item @kbd{@}}
@kindex @}
Widen the current column by @var{n} (the prefix numeric
argument) characters,

@item @kbd{@{}
@kindex @{
Narrow the current column by @var{n} (the prefix numeric
argument) characters.

@item @kbd{SPACE}
@kindex SPACE
Scroll the buffer up.

@item @kbd{BACKSPACE}
@kindex BACKSPACE
Scroll the buffer down.

@item @kbd{n}
@kindex n
Move down one screen line (next line).

@item @kbd{p}
@kindex p
Move up one screen line (previous line).

@item @kbd{q}
@kindex q
Close the buffer.
@end table

@node Inner workings
@chapter Inner workings

@findex rcirc-log-write
@findex rcirc-sqlite-store-log

@code{rcirc} caches the IRC messages in a list, and periodically
writes the contents of this cache to the log files.
@code{rcirc-sqlite} collects the contents of this cache.

@code{rcirc-sqlite} overrides the @code{rcirc}-function
@code{rcirc-log-write} with the @code{rcirc-sqlite}-function
@code{rcirc-sqlite-store-log} for this.

To be able to easy parse the timestamp, @code{rcirc-sqlite} changes
the @code{rcirc-log-time-format}. It does this by advising around the
@code{rcirc}-function rcirc-log.

@menu
* Delay::
@end menu

@node Delay
@section Delay

There is some delay between the arrival of chat messages in the chat
buffer and the storage of the logs in the database.

@code{rcirc} uses the auto-save functionality to trigger the flushing
of the cache to the log file.  Hence, the storage of the chat logs to
the SQLite database by @code{rcirc-sqlite} is also triggered by the
auto-save functionality.

@node Database schema
@chapter Database schema

The SQLite database is created at the first time @code{rcirc-sqlite}
flushes the cache.  The SQLite database is populated with a virtual
table, using the SQLite FTS5 Extension.  The schema of this table has
the following fields.

@itemize
@item
channel:
This is the channel name in the format @code{rcirc} uses to
determine the log file. This format is
@code{channelname@@servername.log}, for example
@code{#rcirc@@LiberaChat.log}.
@item
time:
The timestamp, stored in the unix timestamp format.
@item
nick:
The nick name of the sender.
@item
message:
The actual chat message.
@end itemize


@node GNU Free Documentation License
@appendix GNU Free Documentation License

@cindex FDL, GNU Free Documentation License
@include fdl.texi

@node Command and Function Index
@chapter Command and Function Index

@printindex fn

@node Variable Index
@chapter Variable Index

@printindex vr

@node Key bindings
@chapter Key bindings

@printindex ky

@bye