sql_query

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package: SQLクエリ発行,処理

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Has_app_id

func Has_app_id(app_id string) (bool, error)

app_idがDBに格納されていれば真 * app_id: string 要求されたapp_id

func Insert_status

func Insert_status(state string) error

鍵の状態をデータベースに挿入 * state: string(enum("ON","OFF")) 鍵の状態

Types

type Key_info

type Key_info struct {
	Time        string
	State       string
	Key_info_id int
}

func Get_all_statistics

func Get_all_statistics() ([]Key_info, error)

統計データ全件抽出

func Get_before_state

func Get_before_state(fd time.Time) (Key_info, error)

指定した日時の一つ前のデータを抽出 * fd: time.Time 取得する値の指定日時

func Get_latest_state

func Get_latest_state() (Key_info, error)

最新データ一件を抽出

func Get_statistics

func Get_statistics(fd time.Time, ed time.Time) ([]Key_info, error)

統計データ指定日時から指定日時まで抽出 * fd: time.Time 統計値の取得を開始する指定日時 * ed: time.Time 統計値の取得を終わる指定日時

Jump to

Keyboard shortcuts

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