cleanup
This commit is contained in:
parent
71f844850e
commit
258ce0350b
|
@ -37,22 +37,25 @@
|
||||||
|
|
||||||
; fetch a category
|
; fetch a category
|
||||||
|
|
||||||
do fetch^Category(1,.data)
|
s id=3
|
||||||
w "Category fetched:",!
|
do fetch^Category(id,.data)
|
||||||
|
w "Category fetched (",id,"):",!
|
||||||
w "description: ",data("description"),!
|
w "description: ",data("description"),!
|
||||||
|
|
||||||
; fetch a post
|
; fetch a post
|
||||||
|
|
||||||
do fetch^Post(1,.data)
|
s id=1
|
||||||
w !,"Post fetched:",!
|
do fetch^Post(id,.data)
|
||||||
|
w !,"Post fetched (",id,"):",!
|
||||||
w "slug: ",data("slug"),!
|
w "slug: ",data("slug"),!
|
||||||
w "title: ",data("title"),!
|
w "title: ",data("title"),!
|
||||||
w "description: ",data("description"),!
|
w "description: ",data("description"),!
|
||||||
|
|
||||||
; fetch posts by category
|
; fetch posts by category
|
||||||
|
|
||||||
do fetchByCategory^Post(3,.data)
|
s id=3
|
||||||
w !,"Posts fetched by category:",!
|
do fetchByCategory^Post(id,.data)
|
||||||
|
w !,"Post fetched by category (",id,"):",!
|
||||||
s lev1=""
|
s lev1=""
|
||||||
s lev2=""
|
s lev2=""
|
||||||
s lev3=""
|
s lev3=""
|
||||||
|
@ -63,8 +66,9 @@
|
||||||
|
|
||||||
; fetch posts by user
|
; fetch posts by user
|
||||||
|
|
||||||
do fetchByUser^Post(1,.data)
|
s id=1
|
||||||
w !,"Posts fetched by user:",!
|
do fetchByUser^Post(id,.data)
|
||||||
|
w !,"Post fetched by category (",id,"):",!
|
||||||
s lev1=""
|
s lev1=""
|
||||||
s lev2=""
|
s lev2=""
|
||||||
s lev3=""
|
s lev3=""
|
||||||
|
@ -75,8 +79,9 @@
|
||||||
|
|
||||||
; fetch a comment
|
; fetch a comment
|
||||||
|
|
||||||
do fetch^Comment(1,.data)
|
s id=1
|
||||||
w !,"Comment fetched:",!
|
do fetch^Comment(id,.data)
|
||||||
|
w !,"Comment fetched (",id,"):",!
|
||||||
w "description: ",data("description"),!
|
w "description: ",data("description"),!
|
||||||
|
|
||||||
; drop database
|
; drop database
|
||||||
|
|
12
README.md
12
README.md
|
@ -236,23 +236,23 @@ For further details also visit:
|
||||||
|
|
||||||
### [`basic-sql-blog/Main.m`](https://github.com/programarivm/mumps-examples/blob/master/04-databases/basic-sql-blog/Main.m)
|
### [`basic-sql-blog/Main.m`](https://github.com/programarivm/mumps-examples/blob/master/04-databases/basic-sql-blog/Main.m)
|
||||||
|
|
||||||
Category fetched:
|
Category fetched (3):
|
||||||
description: Foo
|
description: Foobar
|
||||||
|
|
||||||
Post fetched:
|
Post fetched (1):
|
||||||
slug: lorem-ipsum
|
slug: lorem-ipsum
|
||||||
title: Lorem ipsum
|
title: Lorem ipsum
|
||||||
description: Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
description: Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
||||||
|
|
||||||
Posts fetched by category:
|
Post fetched by category (3):
|
||||||
(3,3,2) = curabitur-ullamcorper-ultricies~Curabitur ullamcorper ultricies~Curabitur ullamcorper ultricies nisi.
|
(3,3,2) = curabitur-ullamcorper-ultricies~Curabitur ullamcorper ultricies~Curabitur ullamcorper ultricies nisi.
|
||||||
(4,3,2) = donec-vitae-sapien~Donec vitae sapien~Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante.
|
(4,3,2) = donec-vitae-sapien~Donec vitae sapien~Donec vitae sapien ut libero venenatis faucibus. Nullam quis ante.
|
||||||
|
|
||||||
Posts fetched by user:
|
Post fetched by category (1):
|
||||||
(1,1,1) = lorem-ipsum~Lorem ipsum~Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
(1,1,1) = lorem-ipsum~Lorem ipsum~Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
|
||||||
(2,1,1) = donec-pede-justo~Donec pede justo~Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu.
|
(2,1,1) = donec-pede-justo~Donec pede justo~Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu.
|
||||||
|
|
||||||
Comment fetched:
|
Comment fetched (1):
|
||||||
description: This is awesome! Thank you.
|
description: This is awesome! Thank you.
|
||||||
|
|
||||||
Database successfully dropped!
|
Database successfully dropped!
|
||||||
|
|
Loading…
Reference in New Issue