Documentation
¶
Index ¶
- Constants
- func Param(idx int) string
- type SQL
- func (s *SQL) BeginTx(ctx context.Context, opts *sql.TxOptions) (models.Tx, error)
- func (s *SQL) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (s *SQL) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- func (s *SQL) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
- type Tx
- func (t *Tx) Commit() error
- func (t *Tx) ExecContext(ctx context.Context, query string, args ...interface{}) (sql.Result, error)
- func (t *Tx) QueryContext(ctx context.Context, query string, args ...interface{}) (*sql.Rows, error)
- func (t *Tx) QueryRowContext(ctx context.Context, query string, args ...interface{}) *sql.Row
- func (t *Tx) Rollback() error
Constants ¶
View Source
const AddValidationSession = `insert into
threepid_validation_sessions (medium, address, clientSecret, mtime)
values
($1, $2, $3, $4) RETURNING id;`
View Source
const CreateTMPMxid = `` /* 182-byte string literal not displayed */
View Source
const CreateTokenSession = `insert into
threepid_token_auths (validationSession, token, sendAttemptNumber)
values
($1, $2, $3)`
View Source
const GetAllPeers = `` /* 167-byte string literal not displayed */
View Source
const GetAssociationsAfterId = `` /* 174-byte string literal not displayed */
View Source
const GetLocal3pid = `SELECT
COUNT(*)
FROM
local_threepid_associations
WHERE
medium = $1
AND address = $2
AND mxid = $3;`
View Source
const GetPeerByName = `` /* 187-byte string literal not displayed */
View Source
const GetSenderForToken = `SELECT
sender
FROM
invite_tokens
WHERE
token = $1;`
View Source
const GetSessionByID = `` /* 138-byte string literal not displayed */
View Source
const GetTokenSession = `` /* 308-byte string literal not displayed */
View Source
const GetTokenSessionByID = `` /* 256-byte string literal not displayed */
View Source
const GetTokens = `` /* 163-byte string literal not displayed */
View Source
const GlobalAddAssociation = `` /* 265-byte string literal not displayed */
View Source
const GlobalGetMxid = `` /* 189-byte string literal not displayed */
View Source
const GlobalGetMxids = `` /* 332-byte string literal not displayed */
View Source
const GlobalLastIDFromServer = `SELECT
max(originId),
count(originId)
FROM
global_threepid_associations
WHERE
originServer = $1;`
View Source
const GlobalRemoveAssociation = `DELETE FROM
global_threepid_associations
WHERE
medium = $1
AND address = $2`
View Source
const LocalAddOrUpdateAssociation = `` /* 356-byte string literal not displayed */
View Source
const LocalRemoveAssociation = `` /* 362-byte string literal not displayed */
View Source
const MarkTokensAsSent = `UPDATE
invite_tokens
SET
sent_ts = $1
WHERE
medium = $2
AND address = $3;`
View Source
const SetLastSentVersionAndPokeSucceeded = `update
peers
set
lastSentVersion = $1,
lastPokeSucceededAt = $2
WHERE
name = $3;`
View Source
const SetMtime = `update
threepid_validation_sessions
set
mtime = $1
WHERE
id = $2;`
View Source
const SetSendAttemptNumber = `update
threepid_token_auths
set
sendAttemptNumber = $1
WHERE
id = $2`
View Source
const SetValidated = `update
threepid_validation_sessions
set
validated = $1
WHERE
id = $2;`
View Source
const SignedAssociationStringForThreepid = `` /* 192-byte string literal not displayed */
View Source
const StoreEphemeralPublicKey = `INSERT INTO
ephemeral_public_keys (public_key, persistence_ts)
VALUES
($1, $2);`
View Source
const StoreToken = `INSERT INTO
invite_tokens (
medium,
address,
room_id,
sender,
token,
received_ts
)
VALUES
($1, $2, $3, $4, $5, $6);`
View Source
const ValidateEphemeralPublicKey = `UPDATE
ephemeral_public_keys
SET
verify_count = verify_count + 1
WHERE
public_key = $1;`
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SQL ¶
type SQL struct {
// contains filtered or unexported fields
}
SQL implements models.SQL interface based on *sql.DB adding instrumentation and logging.
func (*SQL) ExecContext ¶
func (*SQL) QueryContext ¶
type Tx ¶
type Tx struct {
// contains filtered or unexported fields
}
func (*Tx) ExecContext ¶
func (*Tx) QueryContext ¶
func (*Tx) QueryRowContext ¶
Click to show internal directories.
Click to hide internal directories.