to_sqlite 0.1.4 copy "to_sqlite: ^0.1.4" to clipboard
to_sqlite: ^0.1.4 copied to clipboard

to_sqlite is a CLI tool which helps to convert CSV files into SQLite databases and model classes.

example/to_sqlite_example.dart

import 'dart:async';

import 'package:to_sqlite/src/cli_client.dart';

/// This example demonstrates how to the `to_sqlite` library works.
/// You can modify the task to generate a configuration file or database
/// as needed.
/// This code serves as a way to understand and try out the tool
/// directly from the source code.
Future<void> main() async {
  final task = Task.generateDB;

  final arg = [task.command, '-f', task.filePath];
  await CLIClient.shared.execute(arg);
}

enum Task {
  generateDB('generate_db', 'assets/config.json'),
  generateConfig('generate_config', 'assets/test.csv');

  final String command;
  final String filePath;

  const Task(
    this.command,
    this.filePath,
  );
}
5
likes
160
points
30
downloads

Publisher

unverified uploader

Weekly Downloads

to_sqlite is a CLI tool which helps to convert CSV files into SQLite databases and model classes.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

args, collection, path, sqlite3

More

Packages that depend on to_sqlite