lsql

package
v0.0.0-...-e6ef1c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 1, 2019 License: EPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var InsertLtext = `INSERT INTO ltext (id, topic, key, value, nnp, nwp, comment, redirect) VALUES (?, ?, ?, ?, ?, ?, ?, ?)`

SQL to insert Ltext into database

View Source
var SchemaLtext = `` /* 185-byte string literal not displayed */

Schema to create Ltext

Functions

func CreateSchema

func CreateSchema(schema string, dbname string) error

Create a schema in the specified database

func FileExists

func FileExists(filename string) bool

fileExists checks if a file exists and is not a directory before we try using it to prevent further errors.

func LocalAres2Sqlite

func LocalAres2Sqlite(
	rootDir string,
	dbname string,
	printProgress bool,
	logger *log.Logger,
) error

Reads lines from ares files in local directories, then writes the lines from each file into the database.

func RepoToSqlite

func RepoToSqlite(
	repo string,
	dbname string,
	printProgress bool,
	logger *log.Logger,
) error

Loads the repo into memory from Github, then writes the lines from each file into the database.

func Repos2Sqlite

func Repos2Sqlite(
	urls []string,
	dbname string,
	printProgress bool,
	logger *log.Logger,
) error

Loads the repo into memory from Github, then writes the lines from each file into the database.

func ReposToSqlite

func ReposToSqlite(
	repos []string,
	dbname string,
	printProgress bool,
	logger *log.Logger,
) error

For each repo, clones in memory, reads lines in files and saves to a sqlite database. If the database file exists, it will first be deleted.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL