Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

SQL.InternalSQLiteLibrary.SetCSVExtensionEnabled

Whether to enable the CSV extensions.

Component Version macOS Windows Linux Server iOS SDK
SQL 15.3 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "SQL.InternalSQLiteLibrary.SetCSVExtensionEnabled"; Value )   More

Parameters

Parameter Description Example
Value The new setting.
Pass 1 to enable or 0 to disable.
1

Result

Returns OK or error.

Description

Whether to enable the CSV extensions.
This file contains the implementation of an SQLite virtual table for reading CSV files.

Usage:

.load ./csv
CREATE VIRTUAL TABLE temp.csv USING csv(filename=FILENAME);
SELECT * FROM csv;

The columns are named "c1", "c2", "c3", ... by default. Or the application can define its own CREATE TABLE statement using the schema= parameter, like this:

CREATE VIRTUAL TABLE temp.csv2 USING csv(
filename = "../http.log",
schema = "CREATE TABLE x(date,ipaddr,url,referrer,userAgent)"
);

Instead of specifying a file, the text of the CSV can be loaded using the data= parameter.

If the columns=N parameter is supplied, then the CSV file is assumed to have N columns. If both the columns= and schema= parameters are omitted, then the number and names of the columns is determined by the first line of the CSV input.

Examples

Enable feature:

Set Variable [$r; Value: MBS( "SQL.InternalSQLiteLibrary.SetCSVExtensionEnabled"; 1 )]

See also

Release notes

Blog Entries

Created 6th June 2025, last changed 29th June 2025


SQL.InternalSQLiteLibrary.SetBase64ExtensionEnabled - SQL.InternalSQLiteLibrary.SetICUEnabled