-
Notifications
You must be signed in to change notification settings - Fork 33
PostgreSQL backend for Ocsipersist #99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
7467ab4
add SQL backend for ocsipersist
349d333
added function skeletons for ocsipersist-sql
5c6b5a7
Enabled lwt PPX syntax for ocsipersist-sql
78e53a3
store = table = string; allow to specify database
4225b35
use higher-order function instead of primitive recursion
a69d404
added more config options for DB connection
72baade
copy connection-handling code from Eba_db
c1a73b6
syntax flags
54b5365
added SQL options to config file
a351630
syntax flags; tyxml
6d6fd23
fixed all the infrastructure problems
2e9b56c
reverted some accidental changes
4af5405
some first queries
2cf874d
cosmetics
c4d2c5f
some more functions
b2582bf
cosmetics
5e849f6
changed types of open_store and open_table into Lwt functions
0900a0e
some more functions
5f20a88
implemented the remaining functions
64eb81e
removed dependency from macaque
60cfbc7
cosmetics
45b335c
added ocsipersist-sql package description
8589560
added parallel build flag
3f36e93
fixed bug (I just can't stop in terms of lazy evaluation)
5fc5170
BLOB -> BYTEA
f539cac
some fixes and improvements
e879e10
removed remainder of old macaque dependency
5df8a67
corrected marshalling/unmarshalling
186425e
various fixes
0783bcb
rename ocsipersist-sql to ocsipersist-pgsql
f44f547
updated docs
3f5713e
Delete .depend file on distclean
8e5e467
string escape key names
022ac43
use as default database name "ocsipersist"
2c61c8a
don't use unnecessary transaction blocks
3235c59
use UPDATE for [set] instead of INSERT
dc9a242
Wiki documentation for ocsipersist-pgsql
23b1bf7
cache queries in a hash table
8064c11
make_persistent does not do a SELECT query anymore
9398874
fix replace_if_exists
1b593ca
add configuration parameter for connection pool size
b0f08ea
updated doc to latest changes
f33a396
refixed make_persistent
1823669
doc
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| include ../../../Makefile.config | ||
|
|
||
| PACKAGE := tyxml.parser pgocaml.syntax lwt.syntax | ||
|
|
||
| LIBS := -I ../../baselib -I ../../http -I ../../server \ | ||
| ${addprefix -package ,${PACKAGE}} | ||
| OCAMLC := $(OCAMLFIND) ocamlc${BYTEDBG} ${THREAD} | ||
| OCAMLOPT := $(OCAMLFIND) ocamlopt ${OPTDBG} ${THREAD} | ||
| OCAMLDOC := $(OCAMLFIND) ocamldoc | ||
| OCAMLDEP := $(OCAMLFIND) ocamldep | ||
|
|
||
| all: byte opt | ||
|
|
||
| ### | ||
|
|
||
| byte: ocsipersist-pgsql.cma | ||
| opt:: ocsipersist-pgsql.cmxa | ||
| ifeq "$(NATDYNLINK)" "YES" | ||
| opt:: ocsipersist-pgsql.cmxs | ||
| endif | ||
|
|
||
| PREDEP := ocsipersist.mli | ||
|
|
||
| ocsipersist-pgsql.cma: ocsipersist.cmo | ||
| $(OCAMLC) -a -o $@ $^ | ||
| cp ocsipersist.cmi .. | ||
| cp $@ .. | ||
|
|
||
| ocsipersist-pgsql.cmxa: ocsipersist.cmx | ||
| $(OCAMLOPT) -a -o $@ $^ | ||
| cp ocsipersist.cmi .. | ||
| cp $@ ${patsubst %.cmxa,%.a,$@} .. | ||
|
|
||
| ocsipersist-pgsql.cmxs: ocsipersist-pgsql.cmxa | ||
| $(OCAMLOPT) -shared -linkall -o $@ $^ | ||
| cp $@ .. | ||
|
|
||
| ocsipersist.mli: | ||
| ln -s ../ocsipersist.mli . | ||
|
|
||
| ########## | ||
|
|
||
| SYNTAX_FLAGS=-syntax camlp4o | ||
|
|
||
| %.cmi: %.mli | ||
| $(OCAMLC) ${LIBS} -c $< | ||
| %.cmo: %.ml | ||
| $(OCAMLC) ${LIBS} ${SYNTAX_FLAGS} -c $< | ||
| %.cmx: %.ml | ||
| $(OCAMLOPT) ${LIBS} ${SYNTAX_FLAGS} -c $< | ||
| %.cmxs: %.cmxa | ||
| $(OCAMLOPT) -shared -linkall -o $@ $< | ||
|
|
||
| ## Clean up | ||
|
|
||
| clean: | ||
| -rm -f *.cm[ioax] *.cmxa *.cmxs *.o *.a *.annot | ||
| -rm -f ${PREDEP} | ||
| distclean: clean | ||
| -rm -f *~ \#* .\#* | ||
| -rm -f .depend | ||
|
|
||
| ## Dependencies | ||
|
|
||
| depend: ${PREDEP} | ||
| $(OCAMLDEP) ${LIBS} *.mli *.ml > .depend | ||
|
|
||
| FORCE: | ||
| -include .depend |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wouldn't be better to point to the opam package name ... ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.