use streams in code for mysql