realtime

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2025 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	CredentialsFile string // Username
	Endpoint        string
	APIKey          string
	CredentialJSON  []byte
	CredentialsURL  string
	CredID          string //scy secret resource ID
	CredentialsKey  string
	UserAgent       string
	ProjectID       string // project ID
	QuotaProject    string
	Scopes          []string
	Location        string
	DatabaseURL     string
	App             string
	url.Values
}

Config is a configuration parsed from a DSN string. If a new Config is created instead of being parsed from a DSN string, the NewConfig function should be used, which sets default values.

func NewConfig

func NewConfig() *Config

NewConfig creates a new Config and sets default values.

func ParseDSN

func ParseDSN(dsn string) (*Config, error)

ParseDSN parses the DSN string to a Config

type Driver

type Driver struct{}

Driver is the Firebase driver structure

func (*Driver) Open

func (d *Driver) Open(dsn string) (driver.Conn, error)

Open establishes a new connection to the Firebase database

type Result

type Result struct {
	// contains filtered or unexported fields
}

Result implements the driver.Result interface

func (*Result) LastInsertId

func (r *Result) LastInsertId() (int64, error)

LastInsertId returns the ID of the last inserted row

func (*Result) RowsAffected

func (r *Result) RowsAffected() (int64, error)

RowsAffected returns the number of rows affected by the query

type Rows

type Rows struct {
	// contains filtered or unexported fields
}

Rows implements the driver.Rows interface

func NewRows

func NewRows(data interface{}, selectStmt *query.Select) *Rows

NewRows creates a new Rows instance from Firebase data

func (*Rows) Close

func (r *Rows) Close() error

Close closes the Rows, preventing further enumeration

func (*Rows) ColumnTypeDatabaseTypeName

func (r *Rows) ColumnTypeDatabaseTypeName(index int) string

ColumnTypeDatabaseTypeName returns the database type name of the column

func (*Rows) ColumnTypeNullable

func (r *Rows) ColumnTypeNullable(index int) (nullable, ok bool)

ColumnTypeNullable reports whether the column may be null

func (*Rows) ColumnTypeScanType

func (r *Rows) ColumnTypeScanType(index int) reflect.Type

ColumnTypeScanType returns the ScanType of the column at the given index

func (*Rows) Columns

func (r *Rows) Columns() []string

Columns returns the names of the columns

func (*Rows) Next

func (r *Rows) Next(dest []driver.Value) error

Next prepares the next result row for reading

type Statement

type Statement struct {
	SQL string
	// contains filtered or unexported fields
}

Statement implements the driver.Stmt interface

func (*Statement) Close

func (s *Statement) Close() error

Close closes the statement

func (*Statement) Exec

func (s *Statement) Exec(args []driver.Value) (driver.Result, error)

Exec executes a non-query statement

func (*Statement) ExecContext

func (s *Statement) ExecContext(ctx context.Context, args []driver.NamedValue) (driver.Result, error)

ExecContext executes a non-query statement with context

func (*Statement) NumInput

func (s *Statement) NumInput() int

NumInput returns the number of placeholder parameters

func (*Statement) Query

func (s *Statement) Query(args []driver.Value) (driver.Rows, error)

Query runs query

func (*Statement) QueryContext

func (s *Statement) QueryContext(ctx context.Context, args []driver.NamedValue) (driver.Rows, error)

QueryContext executes a query statement with context

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL