Debian Codegraph @

src/any/migrate.rs

raw symbols SCIP
1 use craterust-analyzer cargo sqlx-core 0.8.3 crate/::anyrust-analyzer cargo sqlx-core 0.8.3 any/::driverrust-analyzer cargo sqlx-core 0.8.3 any/driver/;
2 use craterust-analyzer cargo sqlx-core 0.8.3 crate/::anyrust-analyzer cargo sqlx-core 0.8.3 any/::{Anyrust-analyzer cargo sqlx-core 0.8.3 any/database/Any#, AnyConnectionrust-analyzer cargo sqlx-core 0.8.3 any/connection/AnyConnection#};
3 use craterust-analyzer cargo sqlx-core 0.8.3 crate/::errorrust-analyzer cargo sqlx-core 0.8.3 error/::Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#;
4 use craterust-analyzer cargo sqlx-core 0.8.3 crate/::migraterust-analyzer cargo sqlx-core 0.8.3 migrate/::{AppliedMigrationrust-analyzer cargo sqlx-core 0.8.3 migrate/migration/AppliedMigration#, Migraterust-analyzer cargo sqlx-core 0.8.3 migrate/migrate/Migrate#, MigrateDatabaserust-analyzer cargo sqlx-core 0.8.3 migrate/migrate/MigrateDatabase#, MigrateErrorrust-analyzer cargo sqlx-core 0.8.3 migrate/error/MigrateError#, Migrationrust-analyzer cargo sqlx-core 0.8.3 migrate/migration/Migration#};
5 use futures_corerust-analyzer cargo futures-core 0.3.34 crate/::futurerust-analyzer cargo futures-core 0.3.34 future/::BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#;
6 use stdrust-analyzer cargo std https://github.com/rust-lang/rust/library/std crate/::timerust-analyzer cargo std https://github.com/rust-lang/rust/library/std time/::Durationrust-analyzer cargo core https://github.com/rust-lang/rust/library/core time/Duration#;
7
8 impl MigrateDatabaserust-analyzer cargo sqlx-core 0.8.3 migrate/migrate/MigrateDatabase# for Anyrust-analyzer cargo sqlx-core 0.8.3 any/database/Any# {
9 fn create_databaserust-analyzer cargo sqlx-core 0.8.3 any/migrate/impl#[Any][MigrateDatabase]create_database().(url: &str) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'_, Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#>> {
10 Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::pinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]pin().(async {
11 driverrust-analyzer cargo sqlx-core 0.8.3 any/driver/::from_url_strrust-analyzer cargo sqlx-core 0.8.3 any/driver/from_url_str().(url)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
12 .get_migrate_databaserust-analyzer cargo sqlx-core 0.8.3 any/driver/impl#[AnyDriver]get_migrate_database().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
13 .create_databaserust-analyzer cargo sqlx-core 0.8.3 any/driver/impl#[AnyMigrateDatabase]create_database().(url)
14 .rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().
15 })
16 }
17
18 fn database_existsrust-analyzer cargo sqlx-core 0.8.3 any/migrate/impl#[Any][MigrateDatabase]database_exists().(url: &str) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'_, Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<bool, Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#>> {
19 Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::pinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]pin().(async {
20 driverrust-analyzer cargo sqlx-core 0.8.3 any/driver/::from_url_strrust-analyzer cargo sqlx-core 0.8.3 any/driver/from_url_str().(url)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
21 .get_migrate_databaserust-analyzer cargo sqlx-core 0.8.3 any/driver/impl#[AnyDriver]get_migrate_database().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
22 .database_existsrust-analyzer cargo sqlx-core 0.8.3 any/driver/impl#[AnyMigrateDatabase]database_exists().(url)
23 .rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().
24 })
25 }
26
27 fn drop_databaserust-analyzer cargo sqlx-core 0.8.3 any/migrate/impl#[Any][MigrateDatabase]drop_database().(url: &str) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'_, Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#>> {
28 Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::pinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]pin().(async {
29 driverrust-analyzer cargo sqlx-core 0.8.3 any/driver/::from_url_strrust-analyzer cargo sqlx-core 0.8.3 any/driver/from_url_str().(url)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
30 .get_migrate_databaserust-analyzer cargo sqlx-core 0.8.3 any/driver/impl#[AnyDriver]get_migrate_database().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
31 .drop_databaserust-analyzer cargo sqlx-core 0.8.3 any/driver/impl#[AnyMigrateDatabase]drop_database().(url)
32 .rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().
33 })
34 }
35
36 fn force_drop_databaserust-analyzer cargo sqlx-core 0.8.3 any/migrate/impl#[Any][MigrateDatabase]force_drop_database().(url: &str) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'_, Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), Errorrust-analyzer cargo sqlx-core 0.8.3 error/Error#>> {
37 Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::pinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]pin().(async {
38 driverrust-analyzer cargo sqlx-core 0.8.3 any/driver/::from_url_strrust-analyzer cargo sqlx-core 0.8.3 any/driver/from_url_str().(url)?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
39 .get_migrate_databaserust-analyzer cargo sqlx-core 0.8.3 any/driver/impl#[AnyDriver]get_migrate_database().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch().
40 .force_drop_databaserust-analyzer cargo sqlx-core 0.8.3 any/driver/impl#[AnyMigrateDatabase]force_drop_database().(url)
41 .rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().
42 })
43 }
44 }
45
46 impl Migraterust-analyzer cargo sqlx-core 0.8.3 migrate/migrate/Migrate# for AnyConnectionrust-analyzer cargo sqlx-core 0.8.3 any/connection/AnyConnection# {
47 fn ensure_migrations_tablerust-analyzer cargo sqlx-core 0.8.3 any/migrate/impl#[AnyConnection][Migrate]ensure_migrations_table().(&mut self) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'_, Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), MigrateErrorrust-analyzer cargo sqlx-core 0.8.3 migrate/error/MigrateError#>> {
48 Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::pinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]pin().(async { self.get_migraterust-analyzer cargo sqlx-core 0.8.3 any/connection/impl#[AnyConnection]get_migrate().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..ensure_migrations_tablerust-analyzer cargo sqlx-core 0.8.3 migrate/migrate/Migrate#ensure_migrations_table().().rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll(). })
49 }
50
51 fn dirty_versionrust-analyzer cargo sqlx-core 0.8.3 any/migrate/impl#[AnyConnection][Migrate]dirty_version().(&mut self) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'_, Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Optionrust-analyzer cargo core https://github.com/rust-lang/rust/library/core option/Option#<i64>, MigrateErrorrust-analyzer cargo sqlx-core 0.8.3 migrate/error/MigrateError#>> {
52 Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::pinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]pin().(async { self.get_migraterust-analyzer cargo sqlx-core 0.8.3 any/connection/impl#[AnyConnection]get_migrate().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..dirty_versionrust-analyzer cargo sqlx-core 0.8.3 migrate/migrate/Migrate#dirty_version().().rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll(). })
53 }
54
55 fn list_applied_migrationsrust-analyzer cargo sqlx-core 0.8.3 any/migrate/impl#[AnyConnection][Migrate]list_applied_migrations().(
56 &mut self,
57 ) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'_, Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Vecrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc vec/Vec#<AppliedMigrationrust-analyzer cargo sqlx-core 0.8.3 migrate/migration/AppliedMigration#>, MigrateErrorrust-analyzer cargo sqlx-core 0.8.3 migrate/error/MigrateError#>> {
58 Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::pinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]pin().(async { self.get_migraterust-analyzer cargo sqlx-core 0.8.3 any/connection/impl#[AnyConnection]get_migrate().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..list_applied_migrationsrust-analyzer cargo sqlx-core 0.8.3 migrate/migrate/Migrate#list_applied_migrations().().rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll(). })
59 }
60
61 fn lockrust-analyzer cargo sqlx-core 0.8.3 any/migrate/impl#[AnyConnection][Migrate]lock().(&mut self) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'_, Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), MigrateErrorrust-analyzer cargo sqlx-core 0.8.3 migrate/error/MigrateError#>> {
62 Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::pinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]pin().(async { self.get_migraterust-analyzer cargo sqlx-core 0.8.3 any/connection/impl#[AnyConnection]get_migrate().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..lockrust-analyzer cargo sqlx-core 0.8.3 migrate/migrate/Migrate#lock().().rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll(). })
63 }
64
65 fn unlockrust-analyzer cargo sqlx-core 0.8.3 any/migrate/impl#[AnyConnection][Migrate]unlock().(&mut self) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'_, Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<(), MigrateErrorrust-analyzer cargo sqlx-core 0.8.3 migrate/error/MigrateError#>> {
66 Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::pinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]pin().(async { self.get_migraterust-analyzer cargo sqlx-core 0.8.3 any/connection/impl#[AnyConnection]get_migrate().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..unlockrust-analyzer cargo sqlx-core 0.8.3 migrate/migrate/Migrate#unlock().().rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll(). })
67 }
68
69 fn applyrust-analyzer cargo sqlx-core 0.8.3 any/migrate/impl#[AnyConnection][Migrate]apply().<'e: 'm, 'm>(
70 &'e mut self,
71 migration: &'m Migrationrust-analyzer cargo sqlx-core 0.8.3 migrate/migration/Migration#,
72 ) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'m, Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Durationrust-analyzer cargo core https://github.com/rust-lang/rust/library/core time/Duration#, MigrateErrorrust-analyzer cargo sqlx-core 0.8.3 migrate/error/MigrateError#>> {
73 Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::pinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]pin().(async { self.get_migraterust-analyzer cargo sqlx-core 0.8.3 any/connection/impl#[AnyConnection]get_migrate().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..applyrust-analyzer cargo sqlx-core 0.8.3 migrate/migrate/Migrate#apply().(migration).rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll(). })
74 }
75
76 fn revertrust-analyzer cargo sqlx-core 0.8.3 any/migrate/impl#[AnyConnection][Migrate]revert().<'e: 'm, 'm>(
77 &'e mut self,
78 migration: &'m Migrationrust-analyzer cargo sqlx-core 0.8.3 migrate/migration/Migration#,
79 ) -> BoxFuturerust-analyzer cargo futures-core 0.3.34 future/BoxFuture#<'m, Resultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/Result#<Durationrust-analyzer cargo core https://github.com/rust-lang/rust/library/core time/Duration#, MigrateErrorrust-analyzer cargo sqlx-core 0.8.3 migrate/error/MigrateError#>> {
80 Boxrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/Box#::pinrust-analyzer cargo alloc https://github.com/rust-lang/rust/library/alloc boxed/impl#[`Box<T>`]pin().(async { self.get_migraterust-analyzer cargo sqlx-core 0.8.3 any/connection/impl#[AnyConnection]get_migrate().()?rust-analyzer cargo core https://github.com/rust-lang/rust/library/core result/impl#[`Result<T, E>`][Try]branch()..revertrust-analyzer cargo sqlx-core 0.8.3 migrate/migrate/Migrate#revert().(migration).rust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll().awaitrust-analyzer cargo core https://github.com/rust-lang/rust/library/core future/future/impl#[`Pin<P>`][Future]poll(). })
81 }
82 }