class DBHandler

Defined in:

db.cr

Constant Summary

DB_PATH = "sqlite3:///srv/crystaldoc.info/github-mamantoha-echo_pages-main/src/../db/echo_pages.db"
TABLE = "pages"

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def create_page(title : String, content : String) : String #

[View source]
def create_table(db) #

[View source]
def delete_page(id) : DB::ExecResult #

[View source]
def page(id : String) : Page | Nil #

[View source]
def pages(page : Int32, per_page : Int32) : Array(Page) #

[View source]
def pages_count : Int64 #

[View source]
def table_exists?(db) : Bool #

[View source]
def update_page(id : String, title : String, content : String) : DB::ExecResult #

[View source]