cleanup
This commit is contained in:
parent
71f844850e
commit
258ce0350b
|
@ -37,22 +37,25 @@
|
|||
|
||||
; fetch a category
|
||||
|
||||
do fetch^Category(1,.data)
|
||||
w "Category fetched:",!
|
||||
s id=3
|
||||
do fetch^Category(id,.data)
|
||||
w "Category fetched (",id,"):",!
|
||||
w "description: ",data("description"),!
|
||||
|
||||
; fetch a post
|
||||
|
||||
do fetch^Post(1,.data)
|
||||
w !,"Post fetched:",!
|
||||
s id=1
|
||||
do fetch^Post(id,.data)
|
||||
w !,"Post fetched (",id,"):",!
|
||||
w "slug: ",data("slug"),!
|
||||
w "title: ",data("title"),!
|
||||
w "description: ",data("description"),!
|
||||
|
||||
; fetch posts by category
|
||||
|
||||
do fetchByCategory^Post(3,.data)
|
||||
w !,"Posts fetched by category:",!
|
||||
s id=3
|
||||
do fetchByCategory^Post(id,.data)
|
||||
w !,"Post fetched by category (",id,"):",!
|
||||
s lev1=""
|
||||
s lev2=""
|
||||
s lev3=""
|
||||
|
@ -63,8 +66,9 @@
|
|||
|
||||
; fetch posts by user
|
||||
|
||||
do fetchByUser^Post(1,.data)
|
||||
w !,"Posts fetched by user:",!
|
||||
s id=1
|
||||
do fetchByUser^Post(id,.data)
|
||||
w !,"Post fetched by category (",id,"):",!
|
||||
s lev1=""
|
||||
s lev2=""
|
||||
s lev3=""
|
||||
|
@ -75,8 +79,9 @@
|
|||
|
||||
; fetch a comment
|
||||
|
||||
do fetch^Comment(1,.data)
|
||||
w !,"Comment fetched:",!
|
||||
s id=1
|
||||
do fetch^Comment(id,.data)
|
||||
w !,"Comment fetched (",id,"):",!
|
||||
w "description: ",data("description"),!
|
||||
|
||||
; 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)
|
||||
|
||||
Category fetched:
|
||||
description: Foo
|
||||
Category fetched (3):
|
||||
description: Foobar
|
||||
|
||||
Post fetched:
|
||||
Post fetched (1):
|
||||
slug: lorem-ipsum
|
||||
title: Lorem ipsum
|
||||
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.
|
||||
(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.
|
||||
(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.
|
||||
|
||||
Database successfully dropped!
|
||||
|
|
Loading…
Reference in New Issue