This file contains 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
<ul id="results-list" className="list-group"> | |
{ | |
this.state.responses.map((item, key) => { | |
if (item.success) { | |
<li key={key} className="list-group-item list-group-item-success"> | |
<pre>{JSON.stringify(item, null, 2)}</pre> | |
</li> | |
} else { | |
<li key={key} className="list-group-item list-group-item-success">bla</li> | |
} |
This file contains 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
plugins { | |
id 'scala' | |
id 'maven-publish' | |
} | |
repositories { | |
mavenCentral() | |
jcenter() | |
} |
This file contains 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
/* | |
* Copyright (c) 2018 Couchbase, Inc. | |
* | |
* Licensed under the Apache License, Version 2.0 (the "License"); | |
* you may not use this file except in compliance with the License. | |
* You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 | |
* | |
* Unless required by applicable law or agreed to in writing, software |
This file contains 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
// --- Collection API --- | |
// full doc fetch | |
Optional<Document> doc = collection.get("id"); | |
// full doc fetch, turns into subdoc actually | |
Optional<Document> doc = collection.get("id", getOptions().withExpiration(true)); | |
// full doc insert (since we now return a doc, let's take a document!) | |
collection.insert( |
This file contains 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
use actix::prelude::*; | |
use futures::stream::once; | |
use futures::sync::mpsc; | |
use message::RawLineMessage; | |
use std::fs::File; | |
use std::io; | |
use std::io::{BufRead, BufReader}; | |
use std::thread; |
This file contains 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
$ tree . | |
. | |
├── Cargo.lock | |
├── Cargo.toml | |
├── src | |
│ └── main.rs | |
└── target | |
├── debug | |
│ ├── build | |
│ ├── deps |
This file contains 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
package com.couchbase.testcontainers; | |
import org.jetbrains.annotations.NotNull; | |
import org.testcontainers.containers.GenericContainer; | |
import org.testcontainers.containers.wait.WaitStrategy; | |
import org.testcontainers.images.builder.ImageFromDockerfile; | |
import org.testcontainers.images.builder.dockerfile.DockerfileBuilder; | |
import java.util.Arrays; | |
import java.util.Collection; |
This file contains 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
class Config extends AbstractCouchbaseConfiguration { | |
protected List<String> getBootstrapHosts() { | |
return Arrays.asList("127.0.0.1"); | |
} | |
protected String getBucketName() { | |
return "travel-sample"; | |
} |
This file contains 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
/* automatically generated by rust-bindgen */ | |
#[repr(C)] | |
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)] | |
pub struct __BindgenBitfieldUnit<Storage, Align> | |
where | |
Storage: AsRef<[u8]> + AsMut<[u8]>, | |
{ | |
storage: Storage, | |
align: [Align; 0], |
This file contains 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
final Scope scope = env.tracer() | |
.buildSpan("query-and-fetch") | |
.startActive(true); | |
bucket.async() | |
.query(N1qlQuery.simple("select meta().id as id from `travel-sample` limit 10"), scope.span()) | |
.flatMap(new Func1<AsyncN1qlQueryResult, Observable<AsyncN1qlQueryRow>>() { | |
public Observable<AsyncN1qlQueryRow> call(AsyncN1qlQueryResult result) { | |
return result.rows(); | |
} |