Skip to main content

daravel_postgres 1.12.0 copy "daravel_postgres: ^1.12.0" to clipboard
daravel_postgres: ^1.12.0 copied to clipboard

PostgreSQL driver for Daravel. Depend on it to choose PostgreSQL explicitly; in Daravel 2.0 the driver lives only here.

example/main.dart

import 'package:daravel/daravel.dart';
import 'package:daravel_postgres/daravel_postgres.dart';

/// Serves an application on PostgreSQL (`DB_CONNECTION` and `DB_*` in
/// `.env`).
Application createApp() =>
    Application.configure(basePath: '.')
        .withPostgres()
        .withRouting(
          api: (router) => router.get(
            '/tables',
            (_) async => {'tables': await (await Schema.builder()).getTables()},
          ),
        )
        .create();

Future<void> main() async => Application.serveWith(createApp);
0
likes
160
points
0
downloads

Documentation

Documentation
API reference

Publisher

verified publisherframework.daravel.dev

Weekly Downloads

PostgreSQL driver for Daravel. Depend on it to choose PostgreSQL explicitly; in Daravel 2.0 the driver lives only here.

Homepage
Repository (GitHub)
View/report issues
Contributing

Topics

#postgresql #postgres #database #server #backend

License

MIT (license)

Dependencies

daravel

More

Packages that depend on daravel_postgres