package com.cesgroup.homwork.mybatis.sample.mapper;

import com.cesgroup.homwork.mybatis.sample.entity.MyEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface MyEntityMapper {

  @Insert("INSERT INTO myEntity (id,context) VALUES(#{id},#{context})")
  void insert(MyEntity myEntity);

  @Select("SELECT id,context FROM myEntity WHERE id = #{id}")
  MyEntity findById(String id);

}