summaryrefslogtreecommitdiffstats
path: root/docs/source/sqltab.rst
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--docs/source/sqltab.rst31
1 files changed, 28 insertions, 3 deletions
diff --git a/docs/source/sqltab.rst b/docs/source/sqltab.rst
index 2531390..299ba2b 100644
--- a/docs/source/sqltab.rst
+++ b/docs/source/sqltab.rst
@@ -7,6 +7,7 @@ In addition to the tables generated for each log format, **lnav** includes
the following tables/views:
* `environ`_
+* `fstat(<path|pattern>)`_
* `lnav_events`_
* `lnav_file`_
* `lnav_file_metadata`_
@@ -31,7 +32,7 @@ by executing the '.schema' SQL command, like so::
environ
-------
-The **environ** table gives you access to the **lnav** process' environment
+The :code:`environ` table gives you access to the **lnav** process' environment
variables. You can :code:`SELECT`, :code:`INSERT`, and :code:`UPDATE`
environment variables, like so:
@@ -55,6 +56,19 @@ named "FILENAME" and then open it in **lnav** by referencing it with
:open $FILENAME
+fstat(<path|pattern>)
+---------------------
+
+The :code:`fstat` table-valued function provides access to the local
+file system. The function takes a file path or a glob pattern and
+returns the results of :code:`lstat(2)` for the matching files. If
+the parameter is a pattern that matches nothing, no rows will be
+returned. If the parameter is a path for a non-existent file, a
+row will be returned with the :code:`error` column set and the
+stat columns as :code:`NULL`. To read the contents of a file, you
+can :code:`SELECT` the hidden :code:`data` column.
+
+
.. _table_lnav_events:
lnav_events
@@ -81,12 +95,22 @@ following columns are available in this table:
:device: The device the file is stored on.
:inode: The inode for the file on the device.
:filepath: If this is a real file, it will be the absolute path. Otherwise,
- it is a symbolic name. If it is a symbolic name, it can be UPDATEd so that
- this file will be considered when saving and loading session information.
+ it is a symbolic name. If it is a symbolic name, it can be UPDATEd
+ so that this file will be considered when saving and loading session
+ information.
+ :mimetype: The detected MIME type of the file.
+ :content_id: The hash of some unique content in the file.
:format: The log file format for the file.
:lines: The number of lines in the file.
:time_offset: The millisecond offset for timestamps. This column can be
UPDATEd to change the offset of timestamps in the file.
+ :options_path: Options can be applied to files based on a path or glob
+ pattern. If this file matches a set of options, the matching path/pattern
+ is available in this column and the actual options themselves are in the
+ :code:`options` column.
+ :options: The options that are applicable to this file. Currently, the
+ only options available are for the timezone set by the
+ :ref:`:set-file-timezone<set_file_timezone>` command.
lnav_file_metadata
------------------
@@ -169,6 +193,7 @@ available in this table:
:top_meta: A JSON object that contains metadata related to the top line
in the view.
:selection: The number of the line that is focused for selection.
+:options: A JSON object that contains optional settings for this view.
lnav_views_echo
---------------