sqllite_table_builder 0.1.2 copy "sqllite_table_builder: ^0.1.2" to clipboard
sqllite_table_builder: ^0.1.2 copied to clipboard

Programmatically create SQL Lite tables.

Programmatically create SQL Lite tables.

Currently SQFLite is tested.

Warning: This package is in alpha. Use it at own risk.

Features #

  • Programmatically create SQL Lite tables.
  • User Foreign Keys to link tables.
  • Use nice programming interface to ensure better safety.

Getting started #

dart pub add sqllite_table_builder

Usage #

// Create a table builder with table name and default primary key.
final someDataTable = SqlTableBuilder("some_data");
// Generate SQL query to create this table.
final someDataQuery = someDataTable.buildSqlCreateQuery();
// Create a table builder with table name and specified primary key.
final userProfileTableBuilder = SqlTableBuilder(
    "user_data",
    primaryKey: SqlColumn(name: "uuid", type: SqlType.text),
);

// Add required columns to a table.
userProfileTableBuilder
    ..createColumn("name", SqlType.text)
    ..nullable(false)
    ..createColumn("age", SqlType.integer)

// Generate SQL query to create this table.
final userProfileQuery = userProfileTableBuilder.buildSqlCreateQuery();

More examples in /examples directory and /tests.

Additional information #

If you would like to contribute to the plugin, check out it's Github page.

1
likes
150
points
18
downloads

Publisher

verified publisherdaniilmira.com

Weekly Downloads

Programmatically create SQL Lite tables.

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (license)

More

Packages that depend on sqllite_table_builder