pub struct CreateUserBuilder { /* private fields */ }
Expand description
createuser
creates a new PostgreSQL
role.
Implementations§
Source§impl CreateUserBuilder
impl CreateUserBuilder
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new CreateUserBuilder
Sourcepub fn from(settings: &dyn Settings) -> Self
pub fn from(settings: &dyn Settings) -> Self
Create a new CreateUserBuilder
from Settings
Sourcepub fn program_dir<P: Into<PathBuf>>(self, path: P) -> Self
pub fn program_dir<P: Into<PathBuf>>(self, path: P) -> Self
Location of the program binary
Sourcepub fn with_admin<S: AsRef<OsStr>>(self, role: S) -> Self
pub fn with_admin<S: AsRef<OsStr>>(self, role: S) -> Self
ROLE will be a member of new role with admin option
Sourcepub fn connection_limit(self, limit: u32) -> Self
pub fn connection_limit(self, limit: u32) -> Self
Connection limit for role (default: no limit)
Sourcepub fn no_createdb(self) -> Self
pub fn no_createdb(self) -> Self
Role cannot create databases (default)
Sourcepub fn no_inherit(self) -> Self
pub fn no_inherit(self) -> Self
Role does not inherit privileges
Sourcepub fn with_member<S: AsRef<OsStr>>(self, role: S) -> Self
pub fn with_member<S: AsRef<OsStr>>(self, role: S) -> Self
ROLE will be a member of new role
Sourcepub fn createrole(self) -> Self
pub fn createrole(self) -> Self
Role can create new roles
Sourcepub fn no_createrole(self) -> Self
pub fn no_createrole(self) -> Self
Role cannot create roles (default)
Sourcepub fn no_superuser(self) -> Self
pub fn no_superuser(self) -> Self
Role will not be superuser (default)
Sourcepub fn valid_until<S: AsRef<OsStr>>(self, timestamp: S) -> Self
pub fn valid_until<S: AsRef<OsStr>>(self, timestamp: S) -> Self
Password expiration date and time for role
Sourcepub fn interactive(self) -> Self
pub fn interactive(self) -> Self
Prompt for missing role name and attributes rather than using defaults
Sourcepub fn no_bypassrls(self) -> Self
pub fn no_bypassrls(self) -> Self
Role cannot bypass row-level security (RLS) policy (default)
Sourcepub fn replication(self) -> Self
pub fn replication(self) -> Self
Role can initiate replication
Sourcepub fn no_replication(self) -> Self
pub fn no_replication(self) -> Self
Role cannot initiate replication (default)
Sourcepub fn username<S: AsRef<OsStr>>(self, username: S) -> Self
pub fn username<S: AsRef<OsStr>>(self, username: S) -> Self
User name to connect as (not the one to create)
Sourcepub fn no_password(self) -> Self
pub fn no_password(self) -> Self
Never prompt for password
Sourcepub fn pg_password<S: AsRef<OsStr>>(self, pg_password: S) -> Self
pub fn pg_password<S: AsRef<OsStr>>(self, pg_password: S) -> Self
user password
Trait Implementations§
Source§impl Clone for CreateUserBuilder
impl Clone for CreateUserBuilder
Source§fn clone(&self) -> CreateUserBuilder
fn clone(&self) -> CreateUserBuilder
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl CommandBuilder for CreateUserBuilder
impl CommandBuilder for CreateUserBuilder
Source§fn get_program(&self) -> &'static OsStr
fn get_program(&self) -> &'static OsStr
Get the program name
Source§fn get_program_dir(&self) -> &Option<PathBuf>
fn get_program_dir(&self) -> &Option<PathBuf>
Location of the program binary
Source§fn env<S: AsRef<OsStr>>(self, key: S, value: S) -> Self
fn env<S: AsRef<OsStr>>(self, key: S, value: S) -> Self
Set an environment variable for the command