-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathcompatibility-in-v2.1.html
77 lines (75 loc) · 3.54 KB
/
compatibility-in-v2.1.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<!DOCTYPE html>
<html>
<head>
<title>Dataset Project</title>
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://caltechlibrary.github.io/css/site.css">
</head>
<body>
<header>
<a href="http://library.caltech.edu" title="link to Caltech Library Homepage"><img src="https://caltechlibrary.github.io/assets/liblogo.gif" alt="Caltech Library logo"></a>
</header>
<nav>
<ul>
<li><a href="/">Home</a></li>
<li><a href="index.html">README</a></li>
<li><a href="LICENSE">LICENSE</a></li>
<li><a href="install.html">INSTALL</a></li>
<li><a href="user_manual.html">User Manual</a></li>
<li><a href="about.html">About</a></li>
<li><a href="search.html">Search</a></li>
<li><a href="https://github.com/caltechlibrary/dataset">GitHub</a></li>
</ul>
</nav>
<section>
<h1 id="compatibity">Compatibity</h1>
<p>As of 2.1 a minimal level of backward dataset v1.1 was added. This
includes support for libdataset, a C-shared library. The goal in adding
support for v1.1 was to facilate migration in the Caltech Library feeds
project. Some features in v1.1 are not available and the features
recreated from v1.1 were done so in a way that maintains the approach of
v2. Aside from continuing support for libdataset the specific v1.1
features will likely be depreciated over time in the name of keeping the
project as simple as possible maintaining focus on the core benefits of
dataset versus other JSON store systems.</p>
<h2 id="what-was-left-out">What was left out</h2>
<p>The methods related to Namaste data have not be implememented as v2
of dataset uses a codemeta.json file for collection metadata. E.g.
<code>Who</code>, <code>Where</code>, <code>Location</code>,
<code>Contact</code>.</p>
<p>The methods <code>KeySort</code> and <code>KeyFilter</code> are not
included.</p>
<h2 id="changed-behavior">Changed behavior</h2>
<p>The <code>DocPath</code> method returns a full path to the JSON
documented stored in a Pairtree collection. If the collection uses an
SQL store then you will get an empty string and an error indicating that
storage type is not supported by <code>DocPath</code>.</p>
<p>The <code>Keys</code> method returns a list of keys (slice of
strings) and an error value.</p>
<h2 id="method-name-changes">Method name changes</h2>
<p>The following methods were normalized to conform with Go idioms in
the standard library.</p>
<ul>
<li><code>KeyExists</code> became <code>HasKey</code></li>
<li><code>FrameExists</code> became <code>HasFrame</code></li>
</ul>
<p>The methods for working with versioned content have the order of the
parameters revised, basically semver is now the last paramter.</p>
<h2 id="changes-method-signatures">Changes method signatures</h2>
<p>Do to the changes in how keys and attachments are handled in v2 you
don’t need to “santize” your returned JSON object. Dataset v2 does not
inject a <code>_Key</code> or <code>_Attachments</code> values in the
JSON document stored. This changes the <code>Read</code> method
signature for collection objects.</p>
<p>The <code>Init</code> method takes a DSN as the second parameter, if
the DSN is an empty string then the collection created will use a
Pairtree store.</p>
</section>
<footer>
<span>© 2022 <a href="https://www.library.caltech.edu/copyright">Caltech Library</a></span>
<address>1200 E California Blvd, Mail Code 1-32, Pasadena, CA 91125-3200</address>
<span><a href="mailto:[email protected]">Email Us</a></span>
<span>Phone: <a href="tel:+1-626-395-3405">(626)395-3405</a></span>
</footer>
</body>
</html>