summary refs log tree commit diff stats
path: root/examples/cross_todo/nim_commandline/nimtodo.nim
diff options
context:
space:
mode:
Diffstat (limited to 'examples/cross_todo/nim_commandline/nimtodo.nim')
-rw-r--r--examples/cross_todo/nim_commandline/nimtodo.nim16
1 files changed, 8 insertions, 8 deletions
diff --git a/examples/cross_todo/nim_commandline/nimtodo.nim b/examples/cross_todo/nim_commandline/nimtodo.nim
index 4ab17e7a2..c8993b2c8 100644
--- a/examples/cross_todo/nim_commandline/nimtodo.nim
+++ b/examples/cross_todo/nim_commandline/nimtodo.nim
@@ -3,7 +3,7 @@
 import backend, db_sqlite, os, parseopt, parseutils, strutils, times
 
 const
-  USAGE = """nimtodo - Nimrod cross platform todo manager
+  USAGE = """nimtodo - Nim cross platform todo manager
 
 Usage:
   nimtodo [command] [list options]
@@ -191,11 +191,11 @@ proc parseCmdLine(): TParamConfig =
     abort("Used list options, but didn't specify the list command.", 10)
 
 
-proc generateDatabaseRows(conn: TDbConn) =
+proc generateDatabaseRows(conn: DbConn) =
   ## Adds some rows to the database ignoring errors.
   discard conn.addTodo(1, "Watch another random youtube video")
   discard conn.addTodo(2, "Train some starcraft moves for the league")
-  discard conn.addTodo(3, "Spread the word about Nimrod")
+  discard conn.addTodo(3, "Spread the word about Nim")
   discard conn.addTodo(4, "Give fruit superavit to neighbours")
   var todo = conn.addTodo(4, "Send tax form through snail mail")
   todo.isDone = true
@@ -209,7 +209,7 @@ proc generateDatabaseRows(conn: TDbConn) =
   echo("Generated some entries, they were added to your database.")
 
 
-proc listDatabaseContents(conn: TDbConn; listParams: TPagedParams) =
+proc listDatabaseContents(conn: DbConn; listParams: TPagedParams) =
   ## Dumps the database contents formatted to the standard output.
   ##
   ## Pass the list/filter parameters parsed from the commandline.
@@ -239,7 +239,7 @@ proc listDatabaseContents(conn: TDbConn; listParams: TPagedParams) =
       todo.text])
 
 
-proc deleteOneTodo(conn: TDbConn; todoId: int64) =
+proc deleteOneTodo(conn: DbConn; todoId: int64) =
   ## Deletes a single todo entry from the database.
   let numDeleted = conn.deleteTodo(todoId)
   if numDeleted > 0:
@@ -248,7 +248,7 @@ proc deleteOneTodo(conn: TDbConn; todoId: int64) =
     quit("Couldn't delete todo id " & $todoId, 11)
 
 
-proc deleteAllTodos(conn: TDbConn) =
+proc deleteAllTodos(conn: DbConn) =
   ## Deletes all the contents from the database.
   ##
   ## Note that it would be more optimal to issue a direct DELETE sql statement
@@ -273,7 +273,7 @@ proc deleteAllTodos(conn: TDbConn) =
   echo("Deleted $1 todo entries from database." % $counter)
 
 
-proc setTodoCheck(conn: TDbConn; todoId: int64; value: bool) =
+proc setTodoCheck(conn: DbConn; todoId: int64; value: bool) =
   ## Changes the check state of a todo entry to the specified value.
   let
     newState = if value: "checked" else: "unchecked"
@@ -293,7 +293,7 @@ proc setTodoCheck(conn: TDbConn; todoId: int64; value: bool) =
     quit("Error updating todo id $1 to $2." % [$todoId, newState])
 
 
-proc addTodo(conn: TDbConn; priority: int; tokens: seq[string]) =
+proc addTodo(conn: DbConn; priority: int; tokens: seq[string]) =
   ## Adds to the database a todo with the specified priority.
   ##
   ## The tokens are joined as a single string using the space character. The