Skip to content

v0.1.6: Amalthea

Compare
Choose a tag to compare
@vertexclique vertexclique released this 29 Apr 11:14
· 64 commits to master since this release

This release contains PostgresSink can be used like:

stream
    .enumerate()
    .map(|(idx, m)| {
        m.map(|e| {
            let doc = SpotifyDocument::new(e.payload_view::<str>().unwrap().unwrap().into());
            println!("Processing document ID: {}", idx);

            let query = "INSERT INTO 
	                 spotify (song_url)
		         VALUES ($1)";

            CPostgresRow::new(query.into(), vec![doc.song_url])
        })
        .ok_or(CallystoError::GeneralError("No payload".into()))
    })
    .forward(
        CPostgresSink::new("postgres://testuser:testpassword@localhost/testdb", 4, 0).unwrap(),
    )
    .await?;