From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by sympa.inria.fr (Postfix) with ESMTPS id CD0277EEBF for ; Sun, 5 Jul 2015 02:03:19 +0200 (CEST) Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of martindemello@gmail.com) identity=pra; client-ip=209.85.160.180; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="martindemello@gmail.com"; x-sender="martindemello@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail3-smtp-sop.national.inria.fr: domain of martindemello@gmail.com designates 209.85.160.180 as permitted sender) identity=mailfrom; client-ip=209.85.160.180; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="martindemello@gmail.com"; x-sender="martindemello@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail3-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-yk0-f180.google.com) identity=helo; client-ip=209.85.160.180; receiver=mail3-smtp-sop.national.inria.fr; envelope-from="martindemello@gmail.com"; x-sender="postmaster@mail-yk0-f180.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A0DLAgAcc5hVlLSgVdFchEYGgxmvY5NOB0wBAQEBAQESAQEBAQcLCwkfMIQ8ER0BGx4DEhAPAiYCJAERAQUBIjWHdwEDEqBZggWBLD4xiz+Ba4J5ilgKGScNV4UvAQUOgROSH4FDBY0Ihw2LaJcMEiOBFReCGxyBcx4xgksBAQE X-IPAS-Result: A0DLAgAcc5hVlLSgVdFchEYGgxmvY5NOB0wBAQEBAQESAQEBAQcLCwkfMIQ8ER0BGx4DEhAPAiYCJAERAQUBIjWHdwEDEqBZggWBLD4xiz+Ba4J5ilgKGScNV4UvAQUOgROSH4FDBY0Ihw2LaJcMEiOBFReCGxyBcx4xgksBAQE X-IronPort-AV: E=Sophos;i="5.15,407,1432591200"; d="scan'208";a="138984962" Received: from mail-yk0-f180.google.com ([209.85.160.180]) by mail3-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 05 Jul 2015 02:03:18 +0200 Received: by ykfy125 with SMTP id y125so121783184ykf.1 for ; Sat, 04 Jul 2015 17:03:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=o9tOVCn2FDlixJk7XnIvzhFPmD+SgMDPVaEwXIby150=; b=Q5t113pRDakA/h9T+paPSWt6VXAfzlfdt+ksiFoh42fSP8NM7CzUOSsmSK8PghlYo9 YbWeJ4EN+9Jw3BZSOWZQjpkFLlyisGi/tmiiNh4oEzTRFg6R6GLDBMYPHKA5+gDHDj0j nEti5YeIcULbhfLmy6+hcMi6CO6J8W9jk8dnt3oYaVYPLs/JTlG66f2qPXEwaBUFZ6KM uutkOFFunte6nVt0keFR2gZRso//Trmm1FJ+en0qu/Dc98WPbfqRtVqNar4jBpTb0qHZ LjStaDKNWNOOi4MMt2Qs1e1bRMRaoQExHayXxs4p7mZHxN4+s7plltQ4609pQNL2u716 n2Gw== MIME-Version: 1.0 X-Received: by 10.170.206.139 with SMTP id x133mr51899786yke.126.1436054597231; Sat, 04 Jul 2015 17:03:17 -0700 (PDT) Received: by 10.13.200.4 with HTTP; Sat, 4 Jul 2015 17:03:17 -0700 (PDT) Date: Sat, 4 Jul 2015 17:03:17 -0700 Message-ID: From: Martin DeMello To: OCaml List Content-Type: text/plain; charset=UTF-8 Subject: [Caml-list] looking for "real world" sqlite3 examples Hi all, I need to integrate an sqlite database in an app of mine, and I'm trying to find existing code I can look at to get some idea of how to go about it. I tried mirage/orm, but ran into some problems (I reported the issue, and the author said the code hadn't been maintained for a while), so I'm falling back on the idea of using sqlite3 directly. Things I am interested in: 1. database schema, versioning and migrations - will i need to do those independently via sql/shell scripts, or is there some good way to integrate them into my ocaml code? 2. type conversions - in the absence of an orm, do i have to write my own by hand per resultset. or is there some intermediate-level library that i haven't found that would automate some of it? 3. is there a maintained library for generating sql queries in a typed manner? But mostly, I want to look at someone else's code and get an idea of how this is done in ocaml; pretty much all my database code to date has been written in dynamically typed languages and relied on code generation. martin