firestore

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2025 License: Apache-2.0 Imports: 20 Imported by: 2

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
	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 Firestore driver structure

func (*Driver) Open

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

Open establishes a new connection to the Firestore database

type Result

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

func (*Result) LastInsertId

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

func (*Result) RowsAffected

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

type Rows

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

func NewRows

func NewRows(results []map[string]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) 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

type Statement

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

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