Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
curry-packages
spicey
Commits
65017a29
Commit
65017a29
authored
Jan 04, 2018
by
Michael Hanus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation updated
parent
2d9878f4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
16 deletions
+22
-16
README.md
README.md
+7
-5
docs/manual.tex
docs/manual.tex
+15
-11
No files found.
README.md
View file @
65017a29
...
...
@@ -6,12 +6,14 @@ To generate an application, follow the steps below.
which describes your entity-relationship model
(see the file "examples/BlogERD.curry" as an example).
2.
Change to the directory in which you want to create the project.
2.
Since the imported module
`Database.ERD`
is part of the package
`cdbi`
,
this package must be installed, e.g., by the command
3.
From there execute
`spiceup`
and supply the name of the term file,
e.g.,
cypm add --dependency cdbi
3.
Execute
`spiceup`
and supply the name of the Curry ERD program, e.g.,
spiceup .../BlogERD.curry
cypm exec
spiceup .../BlogERD.curry
This generates the complete source code of the initial application
(see the generated file README.txt for some explanations).
...
...
@@ -19,7 +21,7 @@ To generate an application, follow the steps below.
You can also provide a file name for the SQLite3 database in which
all data is stored, e.g.,
spiceup --db BlogData.db .../Blog.erdterm
cypm exec
spiceup --db BlogData.db .../Blog.erdterm
If the parameter "--db ..." is not provided, then the name of database
file is "
<ERD>
.db" where
<ERD>
is the name of the specified ER model.
...
...
docs/manual.tex
View file @
65017a29
...
...
@@ -39,13 +39,13 @@ in order to generate a web application.
First, one has to create a textual description of the
entity-relationship model
in a Curry program file as an (exported!) top-level operation type
\code
{
ERD
}
(w.r.t.
\
the type definitions
given
in the
system library
\code
{
Database.ERD
}
)
(w.r.t.
\
the type definitions
defined
in the
module
\code
{
Database.ERD
}
of the package
\code
{
cdbi
}
)
and store it in some program file, e.g.,
\ccode
{
MyERD.curry
}
.
The directory
\code
{
examples
}
in the package
\code
{
spicey
}
\footnote
{
%
If you installed Spicey as described above,
the downloaded
\code
{
spicey
}
package is located in the directory
\code
{
\$
HOME/.cpm/
bin
_
packages/spicey
}
.
}
\code
{
\$
HOME/.cpm/
app
_
packages/spicey
}
.
}
contains two examples for such ERD program files:
\begin{description}
\item
[\code{BlogERD.curry}:]
...
...
@@ -56,17 +56,21 @@ This is an ER model for university lectures as
presented in the paper
\cite
{
BrasselHanusMueller08PADL
}
.
\end{description}
%
Then change to the directory in which you want to create
the project sources.
Execute the command
\pindex
{
spiceup
}
Since the imported module
\code
{
Database.ERD
}
is part of the package
\code
{
cdbi
}
, you have to install this package first, e.g., by the command
\begin{curry}
spiceup .../MyERD.curry
> cypm add --dependency cdbi
\end{curry}
with the path to the ERD program as a parameter
Then you can generate the sources of your web application
by the command
\pindex
{
spiceup
}
\begin{curry}
> cypm exec spiceup MyERD.curry
\end{curry}
with the ERD program as a parameter.
You can also provide a file name for the SQLite3 database used
by the application generated by Spicey, e.g.,
\begin{curry}
spiceup --db MyData.db
.../
MyERD.curry
> cypm exec
spiceup --db MyData.db MyERD.curry
\end{curry}
If the parameter
\ccode
{
--db DBFILE
}
is not provided,
then
\code
{
DBDFILE
}
is set to the default name
\ccode
{$
ERD
$
.db
}
...
...
@@ -81,14 +85,14 @@ After the generation of this project (see the generated file
\code
{
README.txt
}
for information about the generated project structure),
one can compile the generated programs by
\begin{curry}
make compile
>
make compile
\end{curry}
In order to generate the executable web application,
configure the generated
\code
{
Makefile
}
by adapting the variable
\code
{
WEBSERVERDIR
}
to the location
where the compiled cgi programs should be stored, and run
\begin{curry}
make deploy
>
make deploy
\end{curry}
After the successful compilation and deployment of all files,
the application is executable
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment