public void insertPlaneta(Planeta planeta)
 {
     string sql = "INSERT INTO planeta (nombre, gravedad) VALUES(?,?)";
     using (var statement = con.Prepare(sql)) {
         statement.Bind(1, planeta.Nombre);
         statement.Bind(2, planeta.Gravity);
         statement.Step();
     }
 }
 public void updatePlaneta(Planeta planeta)
 {
     string sql = "UPDATE planeta SET nombre=?, gravedad = ? WHERE id=?";
     using (var statement = con.Prepare(sql))
     {
         statement.Bind(1, planeta.Nombre);
         statement.Bind(2, planeta.Gravity);
         statement.Bind(3, planeta.Id);
         statement.Step();
     }
 }
 private Planeta getPlanetaWithStatement(ISQLiteStatement statement)
 {
     Planeta planeta = new Planeta();
     planeta.Id = (long)statement[0];
     planeta.Nombre = (string)statement[1];
     planeta.Gravity = (float)statement[2];
     return planeta;
 }