Lines Matching refs:jbl
24 JBL jbl; in ejdb_test1_3() local
41 rc = ejdb_get(db, "c1", id, &jbl); in ejdb_test1_3()
47 rc = jbl_as_json(jbl, jbl_xstr_json_printer, xstr, 0); in ejdb_test1_3()
54 jbl_destroy(&jbl); in ejdb_test1_3()
66 JBL jbl, at, meta; in ejdb_test1_2() local
71 rc = jbl_from_json(&jbl, "{\"foo\":22}"); in ejdb_test1_2()
73 rc = ejdb_put_new(db, "foocoll", jbl, &llv); in ejdb_test1_2()
75 jbl_destroy(&jbl); in ejdb_test1_2()
78 rc = ejdb_get(db, "foocoll", llv, &jbl); in ejdb_test1_2()
81 rc = jbl_at(jbl, "/foo", &at); in ejdb_test1_2()
86 jbl_destroy(&jbl); in ejdb_test1_2()
91 rc = ejdb_get(db, "foocoll", llv, &jbl); in ejdb_test1_2()
93 CU_ASSERT_PTR_NULL(jbl); in ejdb_test1_2()
95 rc = jbl_from_json(&jbl, "{\"foo\":22}"); in ejdb_test1_2()
97 rc = ejdb_put_new(db, "foocoll", jbl, &llv); in ejdb_test1_2()
99 jbl_destroy(&jbl); in ejdb_test1_2()
151 rc = jbl_at(meta, "/collections/0/name", &jbl); in ejdb_test1_2()
153 CU_ASSERT_STRING_EQUAL(jbl_get_str(jbl), "col1"); in ejdb_test1_2()
154 jbl_destroy(&jbl); in ejdb_test1_2()
156 rc = jbl_at(meta, "/collections/0/indexes/0/ptr", &jbl); in ejdb_test1_2()
158 CU_ASSERT_STRING_EQUAL(jbl_get_str(jbl), "/foo/gaz"); in ejdb_test1_2()
159 jbl_destroy(&jbl); in ejdb_test1_2()
161 rc = jbl_at(meta, "/collections/1/name", &jbl); in ejdb_test1_2()
163 CU_ASSERT_STRING_EQUAL(jbl_get_str(jbl), "foocoll"); in ejdb_test1_2()
164 jbl_destroy(&jbl); in ejdb_test1_2()
166 rc = jbl_at(meta, "/collections/0/indexes/1/ptr", &jbl); in ejdb_test1_2()
168 CU_ASSERT_STRING_EQUAL(jbl_get_str(jbl), "/foo/baz"); in ejdb_test1_2()
169 jbl_destroy(&jbl); in ejdb_test1_2()
183 rc = jbl_at(meta, "/collections/0/name", &jbl); in ejdb_test1_2()
185 CU_ASSERT_STRING_EQUAL(jbl_get_str(jbl), "col1"); in ejdb_test1_2()
186 jbl_destroy(&jbl); in ejdb_test1_2()
188 rc = jbl_at(meta, "/collections/0/indexes/0/ptr", &jbl); in ejdb_test1_2()
190 CU_ASSERT_STRING_EQUAL(jbl_get_str(jbl), "/foo/gaz"); in ejdb_test1_2()
191 jbl_destroy(&jbl); in ejdb_test1_2()
193 rc = jbl_at(meta, "/collections/1/name", &jbl); in ejdb_test1_2()
195 CU_ASSERT_STRING_EQUAL(jbl_get_str(jbl), "foocoll"); in ejdb_test1_2()
196 jbl_destroy(&jbl); in ejdb_test1_2()
198 rc = jbl_at(meta, "/collections/1/rnum", &jbl); in ejdb_test1_2()
200 CU_ASSERT_EQUAL(jbl_get_i64(jbl), 1); in ejdb_test1_2()
201 jbl_destroy(&jbl); in ejdb_test1_2()
203 rc = jbl_at(meta, "/collections/0/indexes/1/ptr", &jbl); in ejdb_test1_2()
205 CU_ASSERT_STRING_EQUAL(jbl_get_str(jbl), "/foo/baz"); in ejdb_test1_2()
206 jbl_destroy(&jbl); in ejdb_test1_2()
218 rc = jbl_at(meta, "/collections/1/indexes/0/ptr", &jbl); in ejdb_test1_2()
221 rc = jbl_at(meta, "/collections/2/indexes/0/ptr", &jbl); in ejdb_test1_2()
224 rc = jbl_at(meta, "/collections/0/indexes/0/ptr", &jbl); in ejdb_test1_2()
226 CU_ASSERT_STRING_EQUAL(jbl_get_str(jbl), "/foo/bar"); in ejdb_test1_2()
227 jbl_destroy(&jbl); in ejdb_test1_2()
243 JBL meta, jbl; in ejdb_test1_1() local
263 rc = jbl_at(meta, "/file", &jbl); in ejdb_test1_1()
265 CU_ASSERT_STRING_EQUAL(jbl_get_str(jbl), "ejdb_test1_1.db"); in ejdb_test1_1()
266 jbl_destroy(&jbl); in ejdb_test1_1()
268 rc = jbl_at(meta, "/collections/0/name", &jbl); in ejdb_test1_1()
270 CU_ASSERT_STRING_EQUAL(jbl_get_str(jbl), "foo"); in ejdb_test1_1()
271 jbl_destroy(&jbl); in ejdb_test1_1()
287 rc = jbl_at(meta, "/collections/0/name", &jbl); // No collections in ejdb_test1_1()