Comments (4)
WebSQL is a async API... your example code it's async :).
Other example:
var selectTask = function(data){
lng.Data.Sql.select('tasks', {done: 0}, function(result) {
//Call to a method (to continue the flow)
read_tasks(result);
});
};
var read_tasks = function(data){
for (var i=0; i < data.length; i++) {
datos.push({
id: data[i].id,
name: data[i].name,
description: data[i].description
});
}
lng.Core.log(1, "Antes: " + datos.length);
};
from lungo.js.
Hola Javi,
En una prueba que estoy haciendo, también me sale mal con el código que has puesto.Al final (ojo, que soy nuevo!!) he hecho como lo tienes en Template.Bindings:
var data_type = lng.Core.toType(result); if (data_type === 'array') { for (var i=0; i < result.length;i++){ sumatorio += result[i].NombreCampo; } } else if (data_type === 'object') { sumatorio += result.NombreCampo; }
Si es un sólo registro Data.Sql devuelve un object.
Saludos,
Lungojs 1.0.3
from lungo.js.
Eso es si solo es un reistro devuelve un object ;) para una mejor perfomance
Enviado desde mi iPad
El 13/12/2011, a las 21:53, kurnajata
[email protected]
escribió:
Hola Javi,
En una prueba que estoy haciendo, también me sale mal con el código que has puesto.Al final (ojo, que soy nuevo!!) he hecho como lo tienes en Template.Bindings:var data_type = lng.Core.toType(result); if (data_type === 'array') { for (var i=0; i < result.length;i++){ sumatorio += result[i].NombreCampo; } } else if (data_type === 'object') { sumatorio += result.NombreCampo; }Si es un sólo registro Data.Sql devuelve un object.
Saludos,
Lungojs 1.0.3
Reply to this email directly or view it on GitHub:
#19 (comment)
from lungo.js.
Cound i use lungo like following?
var result = lng.Data.Sql.select('tasks', {done: 0} );
or
var result = lng.Data.Sql.select('tasks', {done: 0} ,'abc');
i want the result,
but select doesnt give anything back, only pass data to abc, but abc cant return anything.
something wrong with my use?
thanks for helping.
from lungo.js.
Related Issues (20)
- data-async doesn't work
- Consulta sobre licenciamiento
- Refreshing sections and articles
- checkbox
- Touch Events , swipe, does not work, Android 4.4.2 HOT 1
- Lungo is not showing properly the menu on large display devices HOT 2
- data-view-section funciona 1 sola vez. Despues deja de funcionar. HOT 3
- Textbox blur issue. HOT 4
- Confused with the license
- Como genero esta secuencia de pantallas.
- How to use template engine
- swipe problems HOT 4
- ParseError: src/stylesheets/lungo.base.styl:146:1 while building the project
- Enable transitions on tablets
- Cannot read property 'init' of undefined HOT 2
- package/lungo/component.json"
- why section and article display:none
- the website dont load! HOT 2
- Lungo.js 4 - append is not a function HOT 2
- Accessibility support - WAI-ARIA spec - voice over support
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lungo.js.