Documentation
¶
Index ¶
- func OpenAndCreateTablesIfNeeded(driver string, path string, dialect gorp.Dialect) (*gorp.DbMap, error)
- func QueryTotalTableBytes(dbmap *gorp.DbMap, userID int64, projectID string) (int64, error)
- func QuotedTableForQuery(dbmap *gorp.DbMap, i interface{}) (string, error)
- func RegisterAndCreateTablesIfNeeded(dbmap *gorp.DbMap) error
- type Project
- type Table
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func QueryTotalTableBytes ¶
TODO: Remove this? projectQuery already calls QuotedTableForQuery
func QuotedTableForQuery ¶
Types ¶
type Project ¶
type Project struct { UserID int64 `db:",notnull"` ProjectID string `db:",notnull"` FriendlyName string `db:",notnull"` IsLoading bool `db:",notnull"` LoadingPercent int `db:",notnull"` LoadingMessage string `db:",notnull"` LoadingError string `db:",notnull"` }
func GetProjectByID ¶
Returns nil, nil if there is no such user (same as dbMap.Get()). TODO: Return err?
type Table ¶
type Table struct { UserID int64 ProjectID string DatasetID string TableID string FriendlyName string `db:",notnull"` Description string `db:",notnull"` NumBytes int64 `db:",notnull"` NumLongTermBytes int64 `db:",notnull"` NumRows int64 `db:",notnull"` CreationTimeMs int64 `db:",notnull"` LastModifiedTimeMs int64 `db:",notnull"` StreamingEstimatedBytes int64 `db:",notnull"` StreamingEstimatedRows int64 `db:",notnull"` }
https://cloud.google.com/bigquery/docs/reference/rest/v2/tables#resource
type User ¶
func GetUserByAccessToken ¶
func GetUserByAccessToken(getter gorp.SqlExecutor, accessToken string) (*User, error)
Returns nil, nil if there is no such user (same as dbMap.Get()). TODO: Return err?
func GetUserByID ¶
func GetUserByID(getter gorp.SqlExecutor, userID int64) (*User, error)
Returns nil, nil if there is no such user (same as dbMap.Get()). TODO: Return err?
Click to show internal directories.
Click to hide internal directories.