diff --git a/04-databases/simple-crud/Main.m b/04-databases/simple-crud/Main.m index 7a59d53..675f1cc 100644 --- a/04-databases/simple-crud/Main.m +++ b/04-databases/simple-crud/Main.m @@ -3,69 +3,69 @@ s ok=$$set^UserRoutines(1,"alice~password~alice-jones@no-reply.com~Alice Jones") i ok=1 d - . w "User successfully created!",!,! + . w "User successfully created!",! e d - . w "Whoops! The user could not be created.",!,! + . w "Whoops! The user could not be created.",! s ok=$$set^UserRoutines(2,"bob~password~bob-smith@no-reply.com~Bob Smith") i ok=1 d - . w "User successfully created!",!,! + . w "User successfully created!",! e d - . w "Whoops! The user could not be created.",!,! + . w "Whoops! The user could not be created.",! ; fetch a user s ok=$$fetch^UserRoutines(1,.data) i ok=1 d - . w "User successfully fetched!",! - . w "Username: ",data("username"),! - . w "Email: ",data("email"),! - . w "Full name: ",data("fullname"),!,! + . w !,"User successfully fetched!",! + . w "username: ",data("username"),! + . w "email: ",data("email"),! + . w "fullname: ",data("fullname"),! e d - . w "Whoops! The user could not be fetched.",!,! + . w "Whoops! The user could not be fetched.",! ; update a user s ok=$$set^UserRoutines(1,"amelia~password~amelia-roberts@no-reply.com~Amelia Roberts") i ok=1 d - . w "User successfully updated!",!,! + . w !,"User successfully updated!",! e d - . w "Whoops! The user could not be updated.",!,! + . w !,"Whoops! The user could not be updated.",! ; fetch a user s ok=$$fetch^UserRoutines(1,.data) i ok=1 d - . w "User successfully fetched!",! - . w "Username: ",data("username"),! - . w "Email: ",data("email"),! - . w "Full name: ",data("fullname"),!,! + . w !,"User successfully fetched!",! + . w "username: ",data("username"),! + . w "email: ",data("email"),! + . w "fullname: ",data("fullname"),! e d - . w "Whoops! The user could not be fetched.",!,! + . w "Whoops! The user could not be fetched.",! ; delete a user s ok=$$remove^UserRoutines(2) i ok=1 d - . w "User successfully deleted!",!,! + . w !,"User successfully deleted!",! e d - . w "Whoops! The user could not be deleted.",!,! + . w !,"Whoops! The user could not be deleted.",! ; fetch a user s ok=$$fetch^UserRoutines(2,.data) i ok=1 d - . w "User successfully fetched!",! - . w "Username: ",data("username"),! - . w "Email: ",data("email"),! - . w "Full name: ",data("fullname"),!,! + . w !,"User successfully fetched!",! + . w "username: ",data("username"),! + . w "email: ",data("email"),! + . w "fullname: ",data("fullname"),! e d - . w "Whoops! The user could not be fetched.",!,! + . w "Whoops! The user could not be fetched.",! ; drop database s ok=$$drop^DatabaseRoutines() i ok=1 d - . w "Database successfully dropped!",! + . w !,"Database successfully dropped!",! e d - . w "Whoops! The database could not be dropped.",! + . w !,"Whoops! The database could not be dropped.",! diff --git a/README.md b/README.md index a16717a..fb61ff4 100644 --- a/README.md +++ b/README.md @@ -199,31 +199,33 @@ Copy the examples into your `~/.fis-gtm/V6.3-003A_x86_64/r` folder and run: ### [`simple-crud/Main.m`](https://github.com/programarivm/mumps-examples/blob/master/04-databases/simple-crud/Main.m) User successfully created! - User successfully created! User successfully fetched! - Username: alice - Email: alice-jones@no-reply.com - Full name: Alice Jones + username: alice + email: alice-jones@no-reply.com + fullname: Alice Jones User successfully updated! User successfully fetched! - Username: amelia - Email: amelia-roberts@no-reply.com - Full name: Amelia Roberts + username: amelia + email: amelia-roberts@no-reply.com + fullname: Amelia Roberts User successfully deleted! User successfully fetched! - Username: - Email: - Full name: + username: + email: + fullname: Database successfully dropped! - > For further details also visit [UserRoutines.m](https://github.com/programarivm/mumps-examples/blob/master/04-databases/simple-crud/UserRoutines.m) +For further details also visit: + +- [`DatabaseRoutines.m`](https://github.com/programarivm/mumps-examples/blob/master/04-databases/simple-crud/DatabaseRoutines.m) +- [`UserRoutines.m`](https://github.com/programarivm/mumps-examples/blob/master/04-databases/simple-crud/UserRoutines.m) ### [`blog/Main.m`](https://github.com/programarivm/mumps-examples/blob/master/04-databases/blog/Main.m)