@@ -6,7 +6,7 @@ Agora vamos mostrar o passo a passo de como utilizar:
66
77### Importando a lib para o projeto:
88``` groovy
9- implementation 'com.github.p2jorg:simplesql:1.0.29 '
9+ implementation 'com.github.p2jorg:simplesql:1.0.30 '
1010```
1111##### * Observação - Caso você não tenha o JitPack, adicione em seu module project a linha de código com o comentário:
1212``` groovy
@@ -72,23 +72,21 @@ O Processo inicial de criar um banco de dados continua o mesmo, porém, como já
7272public class HelperBD extends SQLiteOpenHelper {
7373 private static final int DATABASE_VERSION = 1 ;
7474 private static final String DATABASE_NAME = " example.db" ;
75- Context context;
7675 private SimpleSQL simpleSQL;
7776
7877 public HelperBD (Context context ) {
7978 super (context, DATABASE_NAME , null , DATABASE_VERSION );
80- this . context = context;
8179 simpleSQL = new SimpleSQL (this );
8280 }
8381
8482 @Override
8583 public void onCreate (SQLiteDatabase sqLiteDatabase ) {
86- String _return = simpleSQL. create(new Pessoa (),db);
84+ simpleSQL. create(new Pessoa (),db);
8785 }
8886
8987 @Override
9088 public void onUpgrade (SQLiteDatabase db , int i , int i1 ) {
91- String _return = simpleSQL. deleteTable(new Pessoa (),db);
89+ simpleSQL. deleteTable(new Pessoa (),db);
9290 onCreate(db);
9391 }
9492
@@ -123,7 +121,7 @@ Para fazer uma listagem dos registro do banco de dados é bem simples, é só cr
123121SimpleSQL simpleSql = new SimpleSQL (new HelperBD (this ));
124122
125123List<Pessoa > list = simpleSQL. selectTable(new Pessoa ())
126- .fields(new String []{ " *" } )
124+ .fields(" *" )
127125 .where()
128126 .column(" id" )
129127 .equals()
@@ -147,8 +145,8 @@ Ainda utilizando o mesmo padrão dos anteriores você também pode atualizar os
147145``` JAVA
148146SimpleSQL simpleSql = new SimpleSQL (new HelperBD (this ));
149147boolean result = simpleSQL. updateTable(new Pessoa ())
150- .set(new String []{ " nome" ," idade" } )
151- .values(new String []{ " Novo Nome" ," Nova Idade" } )
148+ .set(" nome" ," idade" )
149+ .values(" Novo Nome" ," Nova Idade" )
152150 .where()
153151 .column(" id" )
154152 .equals()
0 commit comments