Dagger
Search

psql

It enables you to type in queries interactively, issue them to Postgres, and see the query results.
Alternatively, input can be from a file.
In addition, it provides a number of meta-commands and various shell-like features to facilitate writing scripts and automating a wide variety of tasks.

Installation

dagger install github.com/sagikazarmark/daggerverse/psql@v0.4.0

Entrypoint

Return Type
Psql !
Arguments
NameTypeDescription
versionString Version (image tag) to use from the official image repository as a base container.
containerContainer Custom container to use as a base container. Takes precedence over version.
hostString Name of host to connect to.
serviceService Service to connect to. Port needs to match the exposed port of the service.
portInteger Port number to connect to at the server host.
userSecret PostgreSQL user name to connect as. (default "postgres")
passwordSecret Password to be used if the server demands password authentication.
databaseString The database name.
sslmodeEnum This option determines whether or with what priority a secure SSL TCP/IP connection will be negotiated with the server.
Example
dagger -m github.com/sagikazarmark/daggerverse/psql@897052f1901fcdd18441027e185f52eb7c0b91b1 call \
func (m *myModule) example() *Psql  {
	return dag.
			Psql()
}
@function
def example() -> dag.Psql:
	return (
		dag.psql()
	)
@func()
example(): Psql {
	return dag
		.psql()
}

Types

Psql 🔗

container() 🔗

Return Type
Container !
Example
dagger -m github.com/sagikazarmark/daggerverse/psql@897052f1901fcdd18441027e185f52eb7c0b91b1 call \
 container
func (m *myModule) example() *Container  {
	return dag.
			Psql().
			Container()
}
@function
def example() -> dagger.Container:
	return (
		dag.psql()
		.container()
	)
@func()
example(): Container {
	return dag
		.psql()
		.container()
}

terminal() 🔗

Open a psql terminal.

Return Type
Container !
Example
dagger -m github.com/sagikazarmark/daggerverse/psql@897052f1901fcdd18441027e185f52eb7c0b91b1 call \
 terminal
func (m *myModule) example() *Container  {
	return dag.
			Psql().
			Terminal()
}
@function
def example() -> dagger.Container:
	return (
		dag.psql()
		.terminal()
	)
@func()
example(): Container {
	return dag
		.psql()
		.terminal()
}

list() 🔗

List all available databases.

Return Type
[DatabaseListEntry ! ] !
Example
dagger -m github.com/sagikazarmark/daggerverse/psql@897052f1901fcdd18441027e185f52eb7c0b91b1 call \
 list
func (m *myModule) example() []*PsqlDatabaseListEntry  {
	return dag.
			Psql().
			List()
}
@function
def example() -> List[dag.PsqlDatabaseListEntry]:
	return (
		dag.psql()
		.list()
	)
@func()
example(): PsqlDatabaseListEntry[] {
	return dag
		.psql()
		.list()
}

runCommand() 🔗

Run a single command.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
commandString !-No description provided
Example
dagger -m github.com/sagikazarmark/daggerverse/psql@897052f1901fcdd18441027e185f52eb7c0b91b1 call \
 run-command --command string
func (m *myModule) example(ctx context.Context, command string) string  {
	return dag.
			Psql().
			RunCommand(ctx, command)
}
@function
async def example(command: str) -> str:
	return await (
		dag.psql()
		.run_command(command)
	)
@func()
async example(command: string): Promise<string> {
	return dag
		.psql()
		.runCommand(command)
}

runFile() 🔗

Run a single command from a file.

Return Type
String !
Arguments
NameTypeDefault ValueDescription
fileFile !-No description provided
Example
dagger -m github.com/sagikazarmark/daggerverse/psql@897052f1901fcdd18441027e185f52eb7c0b91b1 call \
 run-file --file file:path
func (m *myModule) example(ctx context.Context, file *File) string  {
	return dag.
			Psql().
			RunFile(ctx, file)
}
@function
async def example(file: dagger.File) -> str:
	return await (
		dag.psql()
		.run_file(file)
	)
@func()
async example(file: File): Promise<string> {
	return dag
		.psql()
		.runFile(file)
}

run() 🔗

Run a series of commands.

Return Type
Run !
Example
dagger -m github.com/sagikazarmark/daggerverse/psql@897052f1901fcdd18441027e185f52eb7c0b91b1 call \
 run
func (m *myModule) example() *PsqlRun  {
	return dag.
			Psql().
			Run()
}
@function
def example() -> dag.PsqlRun:
	return (
		dag.psql()
		.run()
	)
@func()
example(): PsqlRun {
	return dag
		.psql()
		.run()
}

DatabaseListEntry 🔗

name() 🔗

Return Type
String !
Example
Function PsqlDatabaseListEntry.name is not accessible from the psql module
Function PsqlDatabaseListEntry.name is not accessible from the psql module
Function PsqlDatabaseListEntry.name is not accessible from the psql module
Function PsqlDatabaseListEntry.name is not accessible from the psql module

owner() 🔗

Return Type
String !
Example
Function PsqlDatabaseListEntry.owner is not accessible from the psql module
Function PsqlDatabaseListEntry.owner is not accessible from the psql module
Function PsqlDatabaseListEntry.owner is not accessible from the psql module
Function PsqlDatabaseListEntry.owner is not accessible from the psql module

encoding() 🔗

Return Type
String !
Example
Function PsqlDatabaseListEntry.encoding is not accessible from the psql module
Function PsqlDatabaseListEntry.encoding is not accessible from the psql module
Function PsqlDatabaseListEntry.encoding is not accessible from the psql module
Function PsqlDatabaseListEntry.encoding is not accessible from the psql module

localeProvider() 🔗

Return Type
String !
Example
Function PsqlDatabaseListEntry.localeProvider is not accessible from the psql module
Function PsqlDatabaseListEntry.localeProvider is not accessible from the psql module
Function PsqlDatabaseListEntry.localeProvider is not accessible from the psql module
Function PsqlDatabaseListEntry.localeProvider is not accessible from the psql module

collate() 🔗

Return Type
String !
Example
Function PsqlDatabaseListEntry.collate is not accessible from the psql module
Function PsqlDatabaseListEntry.collate is not accessible from the psql module
Function PsqlDatabaseListEntry.collate is not accessible from the psql module
Function PsqlDatabaseListEntry.collate is not accessible from the psql module

ctype() 🔗

Return Type
String !
Example
Function PsqlDatabaseListEntry.ctype is not accessible from the psql module
Function PsqlDatabaseListEntry.ctype is not accessible from the psql module
Function PsqlDatabaseListEntry.ctype is not accessible from the psql module
Function PsqlDatabaseListEntry.ctype is not accessible from the psql module

iculocale() 🔗

Return Type
String !
Example
Function PsqlDatabaseListEntry.iculocale is not accessible from the psql module
Function PsqlDatabaseListEntry.iculocale is not accessible from the psql module
Function PsqlDatabaseListEntry.iculocale is not accessible from the psql module
Function PsqlDatabaseListEntry.iculocale is not accessible from the psql module

icurules() 🔗

Return Type
String !
Example
Function PsqlDatabaseListEntry.icurules is not accessible from the psql module
Function PsqlDatabaseListEntry.icurules is not accessible from the psql module
Function PsqlDatabaseListEntry.icurules is not accessible from the psql module
Function PsqlDatabaseListEntry.icurules is not accessible from the psql module

accessPrivileges() 🔗

Return Type
String !
Example
Function PsqlDatabaseListEntry.accessPrivileges is not accessible from the psql module
Function PsqlDatabaseListEntry.accessPrivileges is not accessible from the psql module
Function PsqlDatabaseListEntry.accessPrivileges is not accessible from the psql module
Function PsqlDatabaseListEntry.accessPrivileges is not accessible from the psql module

Run 🔗

withCommand() 🔗

Add a command to the list of commands.

Return Type
Run !
Arguments
NameTypeDefault ValueDescription
commandString !-No description provided
Example
dagger -m github.com/sagikazarmark/daggerverse/psql@897052f1901fcdd18441027e185f52eb7c0b91b1 call \
 run \
 with-command --command string
func (m *myModule) example(command string) *PsqlRun  {
	return dag.
			Psql().
			Run().
			WithCommand(command)
}
@function
def example(command: str) -> dag.PsqlRun:
	return (
		dag.psql()
		.run()
		.with_command(command)
	)
@func()
example(command: string): PsqlRun {
	return dag
		.psql()
		.run()
		.withCommand(command)
}

withFile() 🔗

Add a command to the list of commands from a file.

Return Type
Run !
Arguments
NameTypeDefault ValueDescription
fileFile !-No description provided
Example
dagger -m github.com/sagikazarmark/daggerverse/psql@897052f1901fcdd18441027e185f52eb7c0b91b1 call \
 run \
 with-file --file file:path
func (m *myModule) example(file *File) *PsqlRun  {
	return dag.
			Psql().
			Run().
			WithFile(file)
}
@function
def example(file: dagger.File) -> dag.PsqlRun:
	return (
		dag.psql()
		.run()
		.with_file(file)
	)
@func()
example(file: File): PsqlRun {
	return dag
		.psql()
		.run()
		.withFile(file)
}

execute() 🔗

Add a command to the list of commands from a file.

Return Type
String !
Example
dagger -m github.com/sagikazarmark/daggerverse/psql@897052f1901fcdd18441027e185f52eb7c0b91b1 call \
 run \
 execute
func (m *myModule) example(ctx context.Context) string  {
	return dag.
			Psql().
			Run().
			Execute(ctx)
}
@function
async def example() -> str:
	return await (
		dag.psql()
		.run()
		.execute()
	)
@func()
async example(): Promise<string> {
	return dag
		.psql()
		.run()
		.execute()
}