my_data = Bulkit::App.get('contacts')
my_data.get_object :firstname => "John",
:lastname => "Doe",
:company => "Css Ninja"
class Contact < Records::Base
include BulkitProcess
BulkitProcess do
attribute :firstname, :lastname, :company
end
end
myData = apiClient.init_db("contacts")
myData.add_object({"firstname": "John",
"lastname": "Doe",
"company": "Css Ninja"})
from django.contrib.bulkit import BulkitApi
class MyModel(BulkitApi):
fields = ('firstname', 'lastname', 'company')
$myData = $apiClient->initDB("contacts");
$myData->addObject([
"firstname" => "John",
"lastname" => "Doe",
"company" => "Css Ninja",
]);
/**
*
* @ORM\Entity
*
* @Bulkit\Index()
*
*/
class Contact
{
/**
* @var string
*
* @ORM\Column(name="firstname", type="string")
* @Bulkit\Attribute
*/
protected $firstname;
}
const myData = apiClient.initDB('contacts');
myData
.addObject({
firstname: 'John',
lastname: 'Doe',
company: 'Css Ninja',
})
.then(content => console.log(content))
.catch(err => console.error(err));
Data<Contact> data = client.initDB("contacts", Contact.class);
data.addObject(
new Contact()
.setFirstname("John")
.setLastname("Doe")
.setCompany("Css Ninja")
);
//For the DSL
import bulkit.BulkitHandlers._
//For basic Future support, you might want to change this by your own ExecutionContext
import scala.concurrent.ExecutionContext.Implicits.global
//case class of your objects
case class Contact(firstname: String,
lastname: String,
compagny: String)
val processing: Future[Processing] = client.execute {
index into "contacts" `object` Contact("John", "Doe", "Css Ninja")
}
object := bulkit.Object{
"firstname": "John",
"lastname": "Doe",
}
res, err = index.AddObject(object)
Data myData = apiClient.InitData("contacts");
var jsonObject = new JObject();
jsonObject.Add("firstname", "John");
jsonObject.Add("lastname", "Doe");
jsonObject.Add("company", "Css Ninja");
myIndex.AddObject(jsonObject);
let myData = apiClient.getData("contacts")
let n = [
"firstname": "John",
"lastname": "Doe",
"company": "Css Ninja"
]
myIndex.addObject(n)
Data myData = apiClient.initData("contacts");
JSONObject jsonObject = new JSONObject()
.put("firstname", "John")
.put("lastname", "Doe")
.put("company", "Css Ninja");
myIndex.addObjectAsync(jsonObject, null);